From f7bf6704d5688f57b1bb0462c22ad6144b6d7d1a Mon Sep 17 00:00:00 2001 From: Florent Date: Fri, 3 Feb 2023 16:26:50 +0100 Subject: [PATCH] Move es_port declaration to support upgrade from older versions At the start of the upgrade script, we can't be sure that elasticsearch8 is installed. --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index f00ae41..eddba44 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,7 +20,6 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) port=$(ynh_app_setting_get --app=$app --key=port) -es_port=$(ynh_app_setting_get --app=elasticsearch8 --key=port) #================================================= # CHECK VERSION @@ -134,6 +133,7 @@ popd #================================================= ynh_script_progression --message="Updating a config file..." +es_port=$(ynh_app_setting_get --app=elasticsearch8 --key=port) ynh_add_config --template="../conf/production.yaml" --destination="$final_path/config/production.yaml" chmod 400 "$final_path/config/production.yaml"