]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/varnish/files/varnish.logrotate
Make varnish log rotation less noisy
[dsa-puppet.git] / modules / varnish / files / varnish.logrotate
diff --git a/modules/varnish/files/varnish.logrotate b/modules/varnish/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
+}