mirror of
https://github.com/YunoHost-Apps/reverseproxy_ynh.git
synced 2024-09-03 20:16:23 +02:00
Handle config checksums in change_url scripts
This commit is contained in:
parent
a47af1ed63
commit
db2eefa498
1 changed files with 9 additions and 1 deletions
|
@ -49,10 +49,18 @@ rp_validate_assets_path
|
||||||
# Special case for "/" path_url
|
# Special case for "/" path_url
|
||||||
rp_handle_webroot
|
rp_handle_webroot
|
||||||
|
|
||||||
|
nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
|
||||||
|
|
||||||
|
ynh_backup_if_checksum_is_different --file="$nginx_conf_path"
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
# Move file to new domain if domain has changed
|
# Move file to new domain if domain has changed
|
||||||
[[ "$old_domain" != "$new_domain" ]] && mv /etc/nginx/conf.d/$old_domain.d/$app.conf /etc/nginx/conf.d/$new_domain.d/$app.conf
|
if [[ "$old_domain" != "$new_domain" ]]; then
|
||||||
|
new_nginx_conf_path=/etc/nginx/conf.d/$new_domain.d/$app.conf
|
||||||
|
ynh_delete_file_checksum --file="$nginx_conf_path"
|
||||||
|
mv $nginx_conf_path $new_nginx_conf_path
|
||||||
|
ynh_store_file_checksum --file="$new_nginx_conf_path"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue