From 7ec0f76f353098cbf848f50edfabbd46d6794c90 Mon Sep 17 00:00:00 2001 From: Daniel Winzen Date: Sat, 7 Sep 2019 12:21:00 +0200 Subject: [PATCH] Updated nginx logrotate --- etc/logrotate.d/nginx | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/etc/logrotate.d/nginx b/etc/logrotate.d/nginx index eba3889..3c8ebbd 100644 --- a/etc/logrotate.d/nginx +++ b/etc/logrotate.d/nginx @@ -7,13 +7,8 @@ notifempty create 0640 www-data www-data sharedscripts - prerotate - if [ -d /etc/logrotate.d/httpd-prerotate ]; then \ - run-parts /etc/logrotate.d/httpd-prerotate; \ - fi \ - endscript postrotate - invoke-rc.d nginx rotate >/dev/null 2>&1 + start-stop-daemon --stop --signal USR1 --quiet --pidfile /run/nginx.pid >/dev/null 2>&1 endscript } /home/*/logs/*.log { @@ -26,12 +21,7 @@ su root www-data create 0640 www-data www-data sharedscripts - prerotate - if [ -d /etc/logrotate.d/httpd-prerotate ]; then \ - run-parts /etc/logrotate.d/httpd-prerotate; \ - fi \ - endscript postrotate - invoke-rc.d nginx rotate >/dev/null 2>&1 + start-stop-daemon --stop --signal USR1 --quiet --pidfile /run/nginx.pid >/dev/null 2>&1 endscript }