Commit 1100aa17 authored by Jérome Perrin's avatar Jérome Perrin

erp5: automatically reload backend apaches when configuration changes

Introduce an service to tell apache to reload its config.
This uses `hash-files` feature of slapos.cookbook:wrapper to get this
process restarted everytime something change in apache configuration
files.
This service wait forever to prevent reloading apache everytime slapos
node instance is running but only when something actually changed.
parent 5ecf5aa6
......@@ -217,6 +217,18 @@ wait-for-files =
${apache-conf-ssl:cert}
${apache-conf-ssl:key}
[{{ section('apache-reload-graceful') }}]
recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:services}/apache-graceful-reload
command-line =
{{ parameter_dict['bash'] }}/bin/bash -c "${apache-graceful:output} &&
{{ parameter_dict['coreutils'] }}/bin/sleep infinity"
hash-files =
${apache-conf-ssl:cert}
${apache-conf-ssl:key}
${apache-conf:rendered}
${apache:wrapper-path}
[apache-graceful]
recipe = collective.recipe.template
input = inline:
......
......@@ -51,6 +51,8 @@ openssl-location = {{ openssl_location }}
apache = {{ apache_location }}
openssl = {{ openssl_location }}
haproxy = {{ haproxy_location }}
bash = {{ bash_location }}
coreutils = {{ coreutils_location }}
bin-directory = {{ bin_directory }}
apachedex-location = {{ bin_directory }}/apachedex
run-apachedex-location = {{ bin_directory }}/runApacheDex
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment