mirror of
https://github.com/YunoHost-Apps/my_webapp_ynh.git
synced 2024-09-03 19:46:26 +02:00
Update install/upgrade
This commit is contained in:
parent
74526f2e53
commit
8fe710187a
3 changed files with 16 additions and 13 deletions
|
@ -25,15 +25,13 @@ name = "My Webapp configuration"
|
|||
ask = "Activate the custom error file use"
|
||||
type = "boolean"
|
||||
default = false
|
||||
# default = "/404.html"
|
||||
help = "you enable this, you can create a custom `404.html` file at the root of your app to act as the custom 404 error page"
|
||||
|
||||
[main.code_error.path_folder]
|
||||
ask = "Specifie folder where your error file are sto"
|
||||
type = "string"
|
||||
default = "/"
|
||||
help = "You can set where your error file are store in your www folder."
|
||||
|
||||
# [main.code_error.path_folder]
|
||||
# ask = "Specifie folder where your error file are sto"
|
||||
# type = "string"
|
||||
# default = "/"
|
||||
# help = "You can set where your error file are store in your www folder."
|
||||
|
||||
[main.php_fpm_config]
|
||||
name = "PHP-FPM configuration"
|
||||
|
|
|
@ -63,6 +63,12 @@ then
|
|||
YNH_PHP_VERSION="$phpversion"
|
||||
fi
|
||||
|
||||
if [ ! $custom_error_file ]
|
||||
then
|
||||
ynh_add_config --template="nginx-code-error.conf" --destination="$nginx_extra_conf_dir/error-code.conf"
|
||||
CUSTOM_ERROR_FILE="$custom_error_file"
|
||||
fi
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
ynh_add_config --template="example-custom-nginx-config.conf" --destination="$nginx_extra_conf_dir/sample.conf"
|
||||
|
|
|
@ -56,9 +56,9 @@ if [ -z "$phpversion" ]; then
|
|||
ynh_app_setting_set --app=$app --key=phpversion --value=$phpversion
|
||||
fi
|
||||
|
||||
# If $codeerror doesn't exist, create it. We assume it is the default system one.
|
||||
if [ -n "$(ynh_app_setting_get --app=$app --key=codeerror)" ]; then
|
||||
codeerror=$(ynh_app_setting_get --app=$app --key=codeerror)
|
||||
# If custom_error_files doesn't exist, create it. We assume it is the default system one.
|
||||
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
|
||||
|
||||
# Delete old user
|
||||
|
@ -96,10 +96,9 @@ then
|
|||
fi
|
||||
|
||||
# Add the config error code
|
||||
if [ -n "$(ynh_app_setting_get --app=$app --key=codeerror)" ];
|
||||
if [ ! $custom_error_file ]
|
||||
then
|
||||
echo add the error config
|
||||
ynh_add_config --template="nginx-code-error.conf" --destination="$nginx_extra_conf_dir/error.conf"
|
||||
ynh_add_config --template="nginx-code-error.conf" --destination="$nginx_extra_conf_dir/error-code.conf"
|
||||
fi
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
|
|
Loading…
Add table
Reference in a new issue