From bd6536ad94312e42498833538fa0c5b87bb690c0 Mon Sep 17 00:00:00 2001 From: polytan02 Date: Tue, 17 Jan 2017 23:15:14 +0000 Subject: [PATCH] No backup before upgrade --- scripts/upgrade | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 1496c48..2522fc0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -4,10 +4,10 @@ app=$YNH_APP_INSTANCE_NAME # Backup the current version of the app, restore it if the upgrade fails -if sudo yunohost backup list | grep -q ${app}-before-upgrade > /dev/null 2>&1; then # Supprime l'ancienne archive seulement si elle existe - sudo yunohost backup delete ${app}-before-upgrade -fi -sudo yunohost backup create --ignore-hooks --apps $app --name ${app}-before-upgrade +#if sudo yunohost backup list | grep -q ${app}-before-upgrade > /dev/null 2>&1; then # Supprime l'ancienne archive seulement si elle existe +# sudo yunohost backup delete ${app}-before-upgrade +#fi +#sudo yunohost backup create --ignore-hooks --apps $app --name ${app}-before-upgrade EXIT_PROPERLY () { exit_code=$? if [ "$exit_code" -eq 0 ]; then @@ -19,8 +19,8 @@ EXIT_PROPERLY () { sudo yunohost backup restore --ignore-hooks ${app}-before-upgrade --apps $app --force # Restore the backup if upgrade failed ynh_die "Upgrade failed. The app was restored to the way it was before the failed upgrade." } -set -eu -trap EXIT_PROPERLY EXIT +#set -eu +#trap EXIT_PROPERLY EXIT # Source app helpers source /usr/share/yunohost/helpers