[master] 327346d Avoid spurious logrotate mail under systemd

Tollef Fog Heen tfheen at err.no
Thu Jun 18 16:56:29 CEST 2015


commit 327346d9284f2739f1818e35a66a8a7af48fcf0e
Author: Tollef Fog Heen <tfheen at err.no>
Date:   Thu Jun 18 16:55:33 2015 +0200

    Avoid spurious logrotate mail under systemd
    
    Ensure varnishlog/varnishncsa are running before trying to reload
    them, to avoid a spurious mail.

diff --git a/changelog b/changelog
index 37af55f..4104c81 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,10 @@
+varnish (4.0.3-2) UNRELEASED; urgency=medium
+
+  * Under systemd, ensure varnishlog/varnishncsa are running before trying
+    to reload them, to avoid a spurious mail.
+
+ -- Tollef Fog Heen <tfheen at debian.org>  Fri, 12 Jun 2015 09:46:22 +0200
+
 varnish (3.0.2-2~bpo60+1) squeeze-backports; urgency=low
 
   * Rebuild for squeeze-backports.
diff --git a/varnish.logrotate b/varnish.logrotate
index 010abe0..b5664a8 100644
--- a/varnish.logrotate
+++ b/varnish.logrotate
@@ -6,6 +6,9 @@
   delaycompress
   missingok
   postrotate
+    if [ -d /run/systemd/system ]; then
+       systemctl -q is-active varnishlog.service || exit 0
+    fi
     /usr/sbin/invoke-rc.d varnishlog reload > /dev/null
   endscript
 }
@@ -18,6 +21,9 @@
   delaycompress
   missingok
   postrotate
+    if [ -d /run/systemd/system ]; then
+       systemctl -q is-active varnishlog.service || exit 0
+    fi
     /usr/sbin/invoke-rc.d varnishncsa reload > /dev/null
   endscript
 }



More information about the varnish-commit mailing list