1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-21 18:37:23 +01:00

Change the remote_nextcloud web_update hook handler strategy

This commit is contained in:
downtownallday
2022-09-22 09:35:50 -04:00
parent 2b25111efa
commit 912b78bb47
3 changed files with 69 additions and 31 deletions

View File

@@ -116,9 +116,12 @@ def do_web_update(env):
nginx_conf += make_domain_config(domain, [template0, template3], ssl_certificates, env)
# execute hooks
hook_data = {'nginx_conf': nginx_conf}
hooks.exec_hooks('web_update', hook_data)
nginx_conf = hook_data['nginx_conf']
hook_data = {
'op':'pre-save',
'nginx_conf':nginx_conf
}
if hooks.exec_hooks('web_update', hook_data):
nginx_conf = hook_data['nginx_conf']
# Did the file change? If not, don't bother writing & restarting nginx.
nginx_conf_fn = "/etc/nginx/conf.d/local.conf"