Update install and upgrade script.

Clear old debug info.
This commit is contained in:
Aurelien Vaillant 2023-08-18 10:46:04 +02:00
parent 9d885a896a
commit 7b0b29cdcc
2 changed files with 5 additions and 8 deletions

View file

@ -63,10 +63,10 @@ then
YNH_PHP_VERSION="$phpversion" YNH_PHP_VERSION="$phpversion"
fi fi
if [ ! $custom_error_file ] if [ $custom_error_file -eq 1 ]
then then
ynh_add_config --template="nginx-code-error.conf" --destination="$nginx_extra_conf_dir/error-code.conf" ynh_add_config --template="nginx-code-error.conf" --destination="$nginx_extra_conf_dir/error-code.conf"
CUSTOM_ERROR_FILE="$custom_error_file" #CUSTOM_ERROR_FILE="$custom_error_file"
fi fi
# Create a dedicated NGINX config # Create a dedicated NGINX config

View file

@ -56,11 +56,9 @@ if [ -z "$phpversion" ]; then
ynh_app_setting_set --app=$app --key=phpversion --value=$phpversion ynh_app_setting_set --app=$app --key=phpversion --value=$phpversion
fi fi
ynh_script_progression --message="Start to init custom error code" # If custom_error_file doesn't exist, create it.
# If custom_error_file doesn't exist, create it. We assume it is the default system one.
if [ -z "${custom_error_file:-}" ]; then if [ -z "${custom_error_file:-}" ]; then
ynh_script_progression --message="Variable not existing, create-it" custom_error_file=1
custom_error_file=$(ynh_app_setting_get --app=$app --key=custom_error_file)
ynh_app_setting_set --app=$app --key=custom_error_file --value=$custom_error_file ynh_app_setting_set --app=$app --key=custom_error_file --value=$custom_error_file
fi fi
@ -98,9 +96,8 @@ then
YNH_PHP_VERSION="$phpversion" YNH_PHP_VERSION="$phpversion"
fi fi
echo call this variable $custom_error_file
# Add the config error code # Add the config error code
if [ ! $custom_error_file ] if [ $custom_error_file -eq 1 ]
then then
ynh_add_config --template="nginx-code-error.conf" --destination="$nginx_extra_conf_dir/error-code.conf" ynh_add_config --template="nginx-code-error.conf" --destination="$nginx_extra_conf_dir/error-code.conf"
fi fi