From 34df8898fe1457aaf31745f5f457b7ce56dc5717 Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Sat, 23 Dec 2017 09:02:26 +0100 Subject: [PATCH] After rotating log files, sleep a few seconds 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/syslog_ng/files/syslog-ng.logrotate b/modules/syslog_ng/files/syslog-ng.logrotate index 895a2cd46..fd9c92b0e 100644 --- a/modules/syslog_ng/files/syslog-ng.logrotate +++ b/modules/syslog_ng/files/syslog-ng.logrotate @@ -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 @@ -128,6 +129,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 -- 2.20.1