From 7b02f2817e88b0b99b76e74c111d15cf3326413d Mon Sep 17 00:00:00 2001 From: Aurelien Vaillant Date: Thu, 17 Aug 2023 11:25:18 +0200 Subject: [PATCH] Another test about the init variable --- scripts/upgrade | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index b895c34..6260a83 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -56,16 +56,12 @@ if [ -z "$phpversion" ]; then ynh_app_setting_set --app=$app --key=phpversion --value=$phpversion fi +ynh_script_progression --message="Start to init custom error code" # If custom_error_file doesn't exist, create it. We assume it is the default system one. -if [ -z "$custom_error_file" ]; then - echo Variable not existing, create-it +if [ -z "${custom_error_file}" ]; then + ynh_script_progression --message="Variable not existing, create-it" custom_error_file=$(ynh_app_setting_get --app=$app --key=custom_error_file) -else - echo The variable exist fi -echo Test a condition -echo ynh_app_setting_get --app=$app --key=custom_error_file -echo Value return # Delete old user if [ -n "$(ynh_app_setting_get --app=$app --key=user)" ]