]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
Work around service(8) not reloading syslog-ng correctly
authorTollef Fog Heen <tfheen@err.no>
Fri, 2 Jan 2015 17:19:30 +0000 (18:19 +0100)
committerTollef Fog Heen <tfheen@err.no>
Fri, 2 Jan 2015 17:19:30 +0000 (18:19 +0100)
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.

modules/syslog-ng/files/syslog-ng.logrotate

index 22047138693e8b33eab93d71c1d007bff8402280..27143073b1cec414cf7fd89d6c25dd9c506873c8 100644 (file)
    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
 }