From f62a62d572e9bd4c9f01d04ea850373ba865c3ee Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 4 Oct 2021 17:45:04 +0200 Subject: [PATCH] Cleaning up --- conf/app.src | 1 - manifest.json | 3 +-- scripts/upgrade | 28 ++++++++++++++-------------- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/conf/app.src b/conf/app.src index 3a3c053..bfeef25 100644 --- a/conf/app.src +++ b/conf/app.src @@ -3,4 +3,3 @@ SOURCE_SUM=f59d2cf4fbfec704404c35b8c5aba3c4361a6f3afee95a0beccc16fcc34985e4 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true -SOURCE_FILENAME= diff --git a/manifest.json b/manifest.json index ec93c05..a88668f 100644 --- a/manifest.json +++ b/manifest.json @@ -31,8 +31,7 @@ "install" : [ { "name": "domain", - "type": "domain", - "example": "example.com" + "type": "domain" }, { "name": "path", diff --git a/scripts/upgrade b/scripts/upgrade index 1ba8d65..23f595e 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,6 +25,20 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) upgrade_type=$(ynh_check_app_version_changed) +#================================================= +# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +#================================================= +ynh_script_progression --message="Backing up Encryptic before upgrading..." --weight=3 + +# 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 + #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= @@ -43,20 +57,6 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up Encryptic before upgrading..." --weight=3 - -# 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 - #================================================= # CREATE DEDICATED USER #=================================================