From 317da9ecc7f53e937c6d181d0e243f8d641b7d25 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 15 Jan 2022 12:05:29 +0100 Subject: [PATCH] Update upgrade --- scripts/upgrade | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 66a5a6c..337ee8f 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -49,36 +49,20 @@ ynh_abort_if_errors #================================================= # UPGRADE SETTINGS FROM OLD INSTALL #================================================= +ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 -ynh_script_progression --message="Fixing old settings..." --weight=1 - -if [[ ${is_public,,*} = "yes" ]] -then - is_public=1 - ynh_app_setting_set --app $app --key is_public --value 1 -fi - -if [[ ${is_public,,*} = "no" ]] -then - is_public=0 - ynh_app_setting_set --app $app --key is_public --value 0 -fi - -if [[ -z $port ]] -then +if [[ -z $port ]]; then # Find a port for SOGo - port=$(ynh_find_port --port 20000) + port=$(ynh_find_port --port=20000) ynh_app_setting_set --app=$app --key=web_port --value=$port fi -if [[ -z $db_name ]] -then +if [[ -z $db_name ]]; then db_name=$app ynh_app_setting_set --app=$app --key=db_name --value=$db_name fi -if [[ -z $db_user ]] -then +if [[ -z $db_user ]]; then db_user=$app ynh_app_setting_set --app=$app --key=db_user --value=$db_user fi