diff --git a/scripts/upgrade b/scripts/upgrade index 3a1bc0d..2034733 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -54,9 +54,12 @@ then fi #================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +# BACKUP BEFORE UPGRADE #================================================= +# We stop the service before to set ynh_clean_setup +systemctl stop matrix-$app.service + # Backup the current version of the app if [[ $(ynh_app_setting_get $app disable_backup_before_upgrade) != '1' ]] then @@ -66,12 +69,6 @@ then } fi -# We stop the service before to enable TRAP because if this command fail the restoration might be not possible. -systemctl stop matrix-$app.service - -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - #================================================= # UPGRADE FROM DIFFERENTS PACKAGE EVOLUTION #=================================================