From bf1aa3b9809bccc8e71784eb9418b93afdd84975 Mon Sep 17 00:00:00 2001 From: Martin Mahner Date: Wed, 8 Jul 2015 05:14:48 +0000 Subject: [PATCH] Fixed logrotate script to have proper permissions and wqrestart nginx after logrotate, otherwise it won't write the log anymore --- server/logrotate.conf | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/server/logrotate.conf b/server/logrotate.conf index ead7ea0..5bf60fc 100644 --- a/server/logrotate.conf +++ b/server/logrotate.conf @@ -2,7 +2,18 @@ monthly rotate 52 dateext - create missingok compress + delaycompress + notifempty + create 0640 www-data adm + 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 + endscript }