mirror of
https://github.com/YunoHost-Apps/my_webapp_ynh.git
synced 2024-09-03 19:46:26 +02:00
Update change_url script to update location path nginx error
This commit is contained in:
parent
ac625f32d3
commit
ad2673106c
1 changed files with 8 additions and 0 deletions
|
@ -52,6 +52,12 @@ then
|
|||
domain="$old_domain"
|
||||
path_url="$new_path"
|
||||
|
||||
# Update custom error file path if needed
|
||||
if [ $custom_error_file -eq 1 ]
|
||||
then
|
||||
ynh_add_config --template="nginx-code-error.conf" --destination="$nginx_extra_conf_dir/error-code.conf"
|
||||
fi
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
fi
|
||||
|
@ -62,6 +68,7 @@ then
|
|||
# Delete file checksum for the old conf file location
|
||||
ynh_delete_file_checksum --file="$nginx_conf_path"
|
||||
ynh_delete_file_checksum --file="$nginx_extra_conf_dir/php.conf"
|
||||
ynh_delete_file_checksum --file="$nginx_extra_conf_dir/nginx-code-error.conf"
|
||||
|
||||
path_url="$new_path"
|
||||
domain="$old_domain"
|
||||
|
@ -74,6 +81,7 @@ then
|
|||
|
||||
# Store file checksum for the new config file location
|
||||
ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.d/php.conf"
|
||||
ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.d/nginx-code-error.conf"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue