Merge remote-tracking branch 'origin/master' into staging
[mirror/dsa-puppet.git] / modules / varnish_pkgmirror / files / varnish.logrotate
diff --git a/modules/varnish_pkgmirror/files/varnish.logrotate b/modules/varnish_pkgmirror/files/varnish.logrotate
new file mode 100644 (file)
index 0000000..afa230d
--- /dev/null
@@ -0,0 +1,29 @@
+/var/log/varnish/varnish.log {
+  daily
+  rotate 7
+  missingok
+  compress
+  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
+}
+
+/var/log/varnish/varnishncsa.log {
+  daily
+  rotate 7
+  missingok
+  compress
+  delaycompress
+  missingok
+  postrotate
+    if [ -d /run/systemd/system ]; then
+       systemctl -q is-active varnishncsa.service || exit 0
+    fi
+    /usr/sbin/invoke-rc.d varnishncsa reload > /dev/null
+  endscript
+}