diff --git a/scripts/config b/scripts/config index 319756e..1cbd2a5 100644 --- a/scripts/config +++ b/scripts/config @@ -148,9 +148,10 @@ ynh_app_config_apply() { ynh_system_user_del_group --username=$app --groups="sftp.app" fi - if [ "${changed[errorfile]}" == "true" ] + if [ "${changed[$custom_error_file]}" == "true" ] then echo Update error nginx config + ynh_add_config --template="nginx-code-error.conf" --destination="$nginx_extra_conf_dir/error-code.conf" fi if [ "$phpversion" != "none" ] diff --git a/scripts/upgrade b/scripts/upgrade index 4becbd5..a9beb78 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -57,7 +57,7 @@ if [ -z "$phpversion" ]; then fi # If custom_error_files doesn't exist, create it. We assume it is the default system one. -if [ -z "$custom_error_file" ]; then +if [ -n "$(ynh_app_setting_get --app=$app --key=custom_error_file)" ]; then custom_error_file=$(ynh_app_setting_get --app=$app --key=custom_error_file) fi