From 0e728462e511f6cfda73c31197f7fd501be3421d Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 1 Dec 2020 00:27:28 +0100 Subject: [PATCH] These should not be added by default either so comment them... --- scripts/upgrade | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 3474983..a2c9ad1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -41,17 +41,23 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --time --weight=1 +# +# N.B. : the followings setting migrations snippets are provided as *EXAMPLES* +# of what you may want to do in some cases (e.g. a setting was not defined on +# some legacy installs and you therefore want to initiaze stuff during upgrade) +# + # If db_name doesn't exist, create it -if [ -z "$db_name" ]; then - db_name=$(ynh_sanitize_dbid --db_name=$app) - ynh_app_setting_set --app=$app --key=db_name --value=$db_name -fi +#if [ -z "$db_name" ]; then +# db_name=$(ynh_sanitize_dbid --db_name=$app) +# ynh_app_setting_set --app=$app --key=db_name --value=$db_name +#fi # If final_path doesn't exist, create it -if [ -z "$final_path" ]; then - final_path=/var/www/$app - ynh_app_setting_set --app=$app --key=final_path --value=$final_path -fi +#if [ -z "$final_path" ]; then +# final_path=/var/www/$app +# ynh_app_setting_set --app=$app --key=final_path --value=$final_path +#fi #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP