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.
This commit is contained in:
Florent 2023-02-03 16:26:50 +01:00 committed by Florent F
parent ed02009b00
commit f7bf6704d5

View file

@ -20,7 +20,6 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path) path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path) final_path=$(ynh_app_setting_get --app=$app --key=final_path)
port=$(ynh_app_setting_get --app=$app --key=port) port=$(ynh_app_setting_get --app=$app --key=port)
es_port=$(ynh_app_setting_get --app=elasticsearch8 --key=port)
#================================================= #=================================================
# CHECK VERSION # CHECK VERSION
@ -134,6 +133,7 @@ popd
#================================================= #=================================================
ynh_script_progression --message="Updating a config file..." 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" ynh_add_config --template="../conf/production.yaml" --destination="$final_path/config/production.yaml"
chmod 400 "$final_path/config/production.yaml" chmod 400 "$final_path/config/production.yaml"