From ef2191dae381932b2ccd26075063373b019b4e80 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 21 Jul 2021 15:40:31 +0200 Subject: [PATCH] Fix --- check_process | 1 - conf/app.src | 1 - scripts/_common.sh | 2 +- scripts/remove | 6 +++--- scripts/upgrade | 28 ++++++++++++++-------------- 5 files changed, 18 insertions(+), 20 deletions(-) diff --git a/check_process b/check_process index 6de33a6..d8b0d45 100644 --- a/check_process +++ b/check_process @@ -1,5 +1,4 @@ ;; Test complet - auto_remove=1 ; Manifest domain="domain.tld" path="/" diff --git a/conf/app.src b/conf/app.src index cad7801..7be8559 100644 --- a/conf/app.src +++ b/conf/app.src @@ -4,4 +4,3 @@ SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true SOURCE_FILENAME= - diff --git a/scripts/_common.sh b/scripts/_common.sh index ab3b7fc..d493113 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -pkg_dependencies="redis-server redis-tools g++ make" +pkg_dependencies="redis-server redis-tools" nodejs_version=14 diff --git a/scripts/remove b/scripts/remove index 2684af4..0cee21d 100644 --- a/scripts/remove +++ b/scripts/remove @@ -15,9 +15,9 @@ source /usr/share/yunohost/helpers app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get $app domain) -port=$(ynh_app_setting_get $app port) -final_path=$(ynh_app_setting_get $app final_path) +domain=$(ynh_app_setting_get --app=$app --key=domain) +port=$(ynh_app_setting_get --app=$app --key=port) +final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= # STANDARD REMOVE diff --git a/scripts/upgrade b/scripts/upgrade index 680d9e8..fc4e75e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -27,6 +27,20 @@ port=$(ynh_app_setting_get --app=$app --key=port) 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=2 + +# 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 #================================================= @@ -45,20 +59,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 the app before upgrading (may take a while)..." --weight=2 - -# 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 #=================================================