From 3df1d919e596c82f918ebc41385e80086e3938f0 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 21 Nov 2021 20:24:48 +0100 Subject: [PATCH] Update upgrade --- scripts/upgrade | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 71bb8b1..87dfd3d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -51,23 +51,6 @@ ynh_systemd_action --action=restart --line_match="You can access your Etherpad i upgrade_type=$(ynh_check_app_version_changed) -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=35 - -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { -# Clean installation remainings that are not handled by the remove script. - ynh_clean_check_starting - - # Restore it if the upgrade fails - ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= @@ -158,6 +141,23 @@ else ynh_permission_url --permission="admin" --auth_header=false fi +#================================================= +# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +#================================================= +ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=35 + +# Backup the current version of the app +ynh_backup_before_upgrade +ynh_clean_setup () { +# Clean installation remainings that are not handled by the remove script. + ynh_clean_check_starting + + # Restore it if the upgrade fails + ynh_restore_upgradebackup +} +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + #================================================= # ACTIVATE MAINTENANCE MODE #=================================================