Commit 1771df7b authored by Jérome Perrin's avatar Jérome Perrin

software/caddy-frontend: review caddy-log-access to not overwrite installed paths

We were using caddy-log-access-header to make sure we have at least one
file to include, but this was implemented in a way that the config file
was overwritten.
Reimplement this by using caddy-log-access-empty to create an empty file
when there are no slaves, caddy-log-access otherwise.
parent 3446030d
......@@ -30,7 +30,7 @@ md5sum = 087bd9404cd120bd7602a9fbfcddc064
[template-slave-list]
filename = templates/apache-custom-slave-list.cfg.in
md5sum = cbe0ee673bf143cd4b874167b14ad22d
md5sum = 29a61267959cc9ba7cdcd96fef41641a
[template-slave-configuration]
filename = templates/custom-virtualhost.conf.in
......
......@@ -465,11 +465,11 @@ template = inline:
rendered = ${:file}
[caddy-log-access-header]
[caddy-log-access-empty]
# Caddy refuse to start if an `import`ed file is empty, so we prepend a header
# so that the file is never empty.
< = jinja2-template-base
template = inline: # This file contain directives to serve directories with log files
template = inline: # This file contain directives to serve directories with log files for shared instances, but no shared instances are defined yet.
rendered = {{frontend_configuration.get('log-access-configuration')}}
[buildout]
......@@ -481,10 +481,12 @@ extends =
parts +=
kedifa-updater
kedifa-updater-run
caddy-log-access-header
{% for part in part_list %}
{{ ' %s' % part }}
{% endfor %}
{% if 'caddy-log-access' not in part_list %}
caddy-log-access-empty
{% endif %}
publish-caddy-information
tunnel-6to4-base-http_port
tunnel-6to4-base-https_port
......
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