rsyslog: don't call init script in logrotate conf file
PATCH 1/1 rsyslog: don't call init script in logrotate conf file
From: Jackie Huang <[email protected]>
Send HUP signal instead of calling the reload command of init script in logrotate configure file, so that it also works when the init system is systemd.
Signed-off-by Jackie Huang <[email protected]>
--- meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate +2 -2
@@ -9,7 +9,7 @@ delaycompress compress postrotate - /etc/init.d/rsyslog reload 2> /dev/null || true + /bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true endscript }
@@ -34,6 +34,6 @@ delaycompress sharedscripts postrotate - /etc/init.d/rsyslog reload 2> /dev/null || true + /bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true endscript }
Signature · 1 line
1.9.1
Quoted 26 lines · On 29/01/15 07:46, [email protected] wrote:
From: Jackie Huang <[email protected]>
Send HUP signal instead of calling the reload command of init script in logrotate configure file, so that it also works when the init system is systemd.
Signed-off-by Jackie Huang <[email protected]>--- meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate +1
-1@@ -9,7 +9,7 @@ delaycompress compress postrotate - /etc/init.d/rsyslog reload 2> /dev/null || true + /bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true endscript }
meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate line 39
Quoted 7 lines
meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate +1
-1@@ -34,6 +34,6 @@ delaycompress sharedscripts postrotate - /etc/init.d/rsyslog reload 2> /dev/null || true + /bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true endscript }
This is better than my approach to fixing this as it works with systemd also. I would take this patch in favour of my
[PATCH] rsyslog: init file has been renamed, reflect in logrotate conf file
Ack from me.
Signature · 5 lines
Jack Mitchell ([email protected]) Embedded Systems Engineer Cambridgeshire, UK http://www.embed.me.uk --