Commit 54ec1aa5 authored by Alain Takoudjou's avatar Alain Takoudjou

Rotate log for all additional apache log files

parent 9e49e48c
...@@ -156,6 +156,20 @@ command = "{{ parameter_dict['openssl'] }}/bin/openssl" req -newkey rsa -batch - ...@@ -156,6 +156,20 @@ command = "{{ parameter_dict['openssl'] }}/bin/openssl" req -newkey rsa -batch -
key = ${apache-conf-ssl:key} key = ${apache-conf-ssl:key}
cert = ${apache-conf-ssl:cert} cert = ${apache-conf-ssl:cert}
{% for family_name, (_, _, _, authentication) in apache_dict.items() -%}
{% if authentication -%}
{% set base_name = 'apache-' ~ family_name -%}
{% do part_list.append('logrotate-' ~ base_name) -%}
[logrotate-{{ base_name }}]
recipe = slapos.cookbook:logrotate.d
logrotate-entries = ${logrotate:logrotate-entries}
backup = ${logrotate:backup}
name = {{ base_name }}
log = ${apache-conf-parameter-dict:log-dir}/{{ base_name }}-error.log ${apache-conf-parameter-dict:log-dir}/{{ base_name }}-access.log
post = {{ parameter_dict['bin-directory'] }}/slapos-kill --pidfile ${apache-conf-parameter-dict:pid-file} -s USR1
{% endif -%}
{% endfor -%}
[logrotate-apache] [logrotate-apache]
recipe = slapos.cookbook:logrotate.d recipe = slapos.cookbook:logrotate.d
logrotate-entries = ${logrotate:logrotate-entries} logrotate-entries = ${logrotate:logrotate-entries}
......
...@@ -73,7 +73,7 @@ md5sum = e75f791c031f042629858e7442d06964 ...@@ -73,7 +73,7 @@ md5sum = e75f791c031f042629858e7442d06964
[template-balancer] [template-balancer]
< = download-base-part < = download-base-part
filename = instance-balancer.cfg.in filename = instance-balancer.cfg.in
md5sum = 894e93c41952f7abc6ecba1088e9e4af md5sum = 2a8d46a2b1b8c2aae12e134cbcafa266
[template-zope] [template-zope]
< = download-base-part < = download-base-part
......
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