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 #=================================================