From 25fc70904656562d59c2d1a0ab31303473c1845e Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 11 Jan 2022 12:20:30 +0100 Subject: [PATCH] Update upgrade --- scripts/upgrade | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index adeafb9..31dbd07 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -22,11 +22,19 @@ key=$(ynh_app_setting_get --app=$app --key=secret_key) is_public=$(ynh_app_setting_get --app=$app --key=is_public) port=$(ynh_app_setting_get --app=$app --key=web_port) +#================================================= +# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +#================================================= +ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1 + # Backup the current version of the app ynh_backup_before_upgrade ynh_clean_setup () { + # Restore it if the upgrade fails ynh_restore_upgradebackup } +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors #================================================= # STANDARD UPGRADE STEPS