diff --git a/scripts/upgrade b/scripts/upgrade index 657fbe8..5fc9d08 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,6 +25,14 @@ lfs_key=$(ynh_app_setting_get --app=$app --key=lfs_key) port=$(ynh_app_setting_get --app=$app --key=web_port) upstream_version=$(ynh_app_setting_get --app=$app --key=upstream_version) +#================================================= +# STOP SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Stopping a systemd service..." --weight=1 + +# We stop the service before to set ynh_clean_setup +ynh_systemd_action --service_name=$app --action="stop" + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -43,14 +51,6 @@ fi # Exit if an error occurs during the execution of the script ynh_abort_if_errors -#================================================= -# STOP SYSTEMD SERVICE -#================================================= -ynh_script_progression --message="Stopping a systemd service..." --weight=1 - -# We stop the service before to set ynh_clean_setup -ynh_systemd_action --service_name=$app --action="stop" - #================================================= # ENSURE DOWNWARD COMPATIBILITY #=================================================