From 3a5ad42ff5355ab930445f50fa94a0617d32e477 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 20 Nov 2020 22:06:07 +0100 Subject: [PATCH] Update upgrade --- scripts/upgrade | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index ba24a9c..d58c79a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,14 +23,7 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name) with_carddav=$(ynh_app_setting_get --app=$app --key=with_carddav) with_enigma=$(ynh_app_setting_get --app=$app --key=with_enigma) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) - - # If language doesn't exist, create it - if [ -z "$language" ]; then - language=$YNH_APP_ARG_LANGUAGE - ynh_app_setting_set --app=$app --key=language --value=$language - else - language=$(ynh_app_setting_get --app=$app --key=language) - fi +language=$(ynh_app_setting_get --app=$app --key=language) #================================================= # CHECK VERSION @@ -77,6 +70,12 @@ if [ -z "$with_enigma" ]; then ynh_app_setting_set --app=$app --key=with_enigma --value=$with_enigma fi + # If language doesn't exist, create it + if [ -z "$language" ]; then + language="en_GB" + ynh_app_setting_set --app=$app --key=language --value=$language +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #=================================================