From 0d1e2e97bcbc80e6acd60c14fb6ca8c05931dfb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Mon, 12 Feb 2018 10:26:59 +0100 Subject: [PATCH] Fix upgrade script --- scripts/upgrade | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) 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 #=================================================