Fix bug on debian logrotate scripts (#260)
prerotate isn't working if there is no httpd-prerotate and it's no more needed and also postrotate can be kill -USR1
This commit is contained in:
parent
06b8f5a020
commit
7822449f25
@ -5,14 +5,11 @@
|
|||||||
{% for option in nginx_logrotate_conf.options %}
|
{% for option in nginx_logrotate_conf.options %}
|
||||||
{{ option }}
|
{{ option }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
prerotate
|
|
||||||
if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
|
|
||||||
run-parts /etc/logrotate.d/httpd-prerotate; \
|
|
||||||
fi \
|
|
||||||
endscript
|
|
||||||
postrotate
|
postrotate
|
||||||
{% if ansible_os_family == "Debian" %}
|
{% if ansible_os_family == "Debian" %}
|
||||||
invoke-rc.d nginx rotate >/dev/null 2>&1
|
if [ -f /var/run/nginx.pid ]; then
|
||||||
|
kill -USR1 `cat /var/run/nginx.pid`
|
||||||
|
fi
|
||||||
{% else %}
|
{% else %}
|
||||||
nginx -s reopen
|
nginx -s reopen
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user