From d6a095f24770d58e0cb13fc18195bbb0dab7dbeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 26 Jun 2022 12:27:29 +0200 Subject: [PATCH] Update upgrade --- scripts/upgrade | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 4fbc370..f6f60e1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -51,16 +51,16 @@ 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=1 +# 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 +# # 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 @@ -84,10 +84,10 @@ if [ -z "$version" ]; then ynh_app_setting_set --app=$app --key=version --value=$version fi -# if [ -z "$db_name" ]; then -# db_name="$app" -# ynh_app_setting_set --app=$app --key=db_name --value=$db_name -# fi +if [ -z "$db_name" ]; then + db_name="$app" + ynh_app_setting_set --app=$app --key=db_name --value=$db_name +fi # if [ -z "$db_pwd" ]; then # db_pwd=$(ynh_string_random --length=24)