From 18041281e30df674665c0c54e0855c8deac7446c Mon Sep 17 00:00:00 2001 From: Aurelien Vaillant Date: Thu, 17 Aug 2023 18:13:41 +0200 Subject: [PATCH] Update config with int comparaison --- scripts/config | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/config b/scripts/config index a4ef631..4c8b5c9 100644 --- a/scripts/config +++ b/scripts/config @@ -154,11 +154,12 @@ ynh_app_config_apply() { nginx_extra_conf_dir="/etc/nginx/conf.d/$domain.d/$app.d" ynh_print_info --message="Update the custom setting $custom_error_file" - if [ $custom_error_file ] + if [ $custom_error_file -eq 1 ] then ynh_print_info --message="Add the config file" ynh_add_config --template="nginx-code-error.conf" --destination="$nginx_extra_conf_dir/error-code.conf" - else + elif [ $custom_error_file -eq 0 ] + then ynh_print_info --message="Remove the config file" ynh_secure_remove --file="$nginx_extra_conf_dir/error-code.conf" fi