From: Tollef Fog Heen Date: Fri, 2 Jan 2015 17:19:30 +0000 (+0100) Subject: Work around service(8) not reloading syslog-ng correctly X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=31031e8f5468946c3e2c8e7a9f3be1128c5c090d;p=mirror%2Fdsa-puppet.git Work around service(8) not reloading syslog-ng correctly It seems systemd fails to mark syslog-ng as reloadable, which in turn leads to invoke-rc.d failing. Just call systemctl directly if we're running systemd to work around this. --- diff --git a/modules/syslog-ng/files/syslog-ng.logrotate b/modules/syslog-ng/files/syslog-ng.logrotate index 220471386..27143073b 100644 --- a/modules/syslog-ng/files/syslog-ng.logrotate +++ b/modules/syslog-ng/files/syslog-ng.logrotate @@ -119,6 +119,10 @@ daily compress postrotate - /usr/sbin/invoke-rc.d syslog-ng reload >/dev/null + 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 }