After rotating log files, sleep a few seconds
authorTollef Fog Heen <tfheen@err.no>
Sat, 23 Dec 2017 08:02:26 +0000 (09:02 +0100)
committerTollef Fog Heen <tfheen@err.no>
Sat, 23 Dec 2017 08:02:26 +0000 (09:02 +0100)
This allows syslog to actually reopen files, we're seeing problems
where it's (probably) ignoring the signal since it's in the middle of
rotating already.

Since this runs from logrotate there should be no admin irritation
over it.

modules/syslog_ng/files/syslog-ng.logrotate

index 895a2cd..fd9c92b 100644 (file)
@@ -28,6 +28,7 @@
    postrotate
       if [ -d /run/systemd/system ]; then
           /bin/systemctl reload syslog-ng.service >/dev/null
+         sleep 5
       else
           /usr/sbin/invoke-rc.d syslog-ng reload >/dev/null
       fi
    postrotate
       if [ -d /run/systemd/system ]; then
           /bin/systemctl reload syslog-ng.service >/dev/null
+         sleep 5
       else
           /usr/sbin/invoke-rc.d syslog-ng reload >/dev/null
       fi