From a09033d077a54f1686faaaeb25e3dfc6a8ab68e9 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 22 Jun 2022 12:37:36 +0200 Subject: [PATCH] Update upgrade --- scripts/upgrade | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 0c85b96..2f0ef2a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -39,6 +39,14 @@ then ynh_die --message="Sorry, this version is not upgradable to the latest version :(" fi +#================================================= +# STOP SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Stopping a systemd service..." --weight=1 + +# Stop bservice before backup, to not loose message in case of failed upgrade and restore +ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd --line_match="Stopped" + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -56,13 +64,6 @@ ynh_abort_if_errors #================================================= # STANDARD UPGRADE STEPS -#================================================= -# STOP SYSTEMD SERVICE -#================================================= -ynh_script_progression --message="Stopping a systemd service..." --weight=1 - -ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd --line_match="Stopped" - #================================================= # ENSURE DOWNWARD COMPATIBILITY #=================================================