From 3065ea9c1843b6113ab8ae628b915bba101ab890 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Sun, 17 Dec 2023 17:06:42 +0100 Subject: [PATCH] Update upgrade --- scripts/upgrade | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 48abda0..6128bb6 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,16 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= - -admin=$(ynh_user_get_info --username=$admin --key=username) -admin_mail=$(ynh_user_get_info --username=$admin --key=mail) - -ynh_app_setting_set --app=$app --key=weather_api_provider --value=$weather_api_provider -ynh_app_setting_set --app=$app --key=weather_api_key --value=$weather_api_key - #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= @@ -34,6 +24,15 @@ if [ -z "${weather_api_key:-}" ]; then ynh_app_setting_set --app=$app --key=weather_api_key --value=$weather_api_key fi +#================================================= +# LOAD SETTINGS +#================================================= + +admin=$(ynh_user_get_info --username=$admin --key=username) +admin_mail=$(ynh_user_get_info --username=$admin --key=mail) + +ynh_app_setting_set --app=$app --key=weather_api_provider --value=$weather_api_provider +ynh_app_setting_set --app=$app --key=weather_api_key --value=$weather_api_key #================================================= # CHECK VERSION