Reload syslog-ng after daemon.log rotation to prevent cron spam
authorTollef Fog Heen <tfheen@err.no>
Wed, 1 Nov 2017 20:36:42 +0000 (21:36 +0100)
committerTollef Fog Heen <tfheen@err.no>
Wed, 1 Nov 2017 20:36:42 +0000 (21:36 +0100)
modules/syslog_ng/files/syslog-ng.logrotate

index 2714307..895a2cd 100644 (file)
    missingok
    notifempty
    compress
+   postrotate
+      if [ -d /run/systemd/system ]; then
+          /bin/systemctl reload syslog-ng.service >/dev/null
+      else
+          /usr/sbin/invoke-rc.d syslog-ng reload >/dev/null
+      fi
+   endscript
 }
 
 /var/log/debug {