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