7822449f25
prerotate isn't working if there is no httpd-prerotate and it's no more needed and also postrotate can be kill -USR1
18 lines
369 B
Django/Jinja
18 lines
369 B
Django/Jinja
{% for path in nginx_logrotate_conf.paths %}
|
|
{{ path }}
|
|
{% endfor %}
|
|
{
|
|
{% for option in nginx_logrotate_conf.options %}
|
|
{{ option }}
|
|
{% endfor %}
|
|
postrotate
|
|
{% if ansible_os_family == "Debian" %}
|
|
if [ -f /var/run/nginx.pid ]; then
|
|
kill -USR1 `cat /var/run/nginx.pid`
|
|
fi
|
|
{% else %}
|
|
nginx -s reopen
|
|
{% endif %}
|
|
endscript
|
|
}
|