packages: varnish/varnish.logrotate - add rotate via flush-logs target

glen glen at pld-linux.org
Wed Nov 18 16:32:49 CET 2009


Author: glen                         Date: Wed Nov 18 15:32:49 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- add rotate via flush-logs target

---- Files affected:
packages/varnish:
   varnish.logrotate (1.3 -> 1.4) 

---- Diffs:

================================================================
Index: packages/varnish/varnish.logrotate
diff -u packages/varnish/varnish.logrotate:1.3 packages/varnish/varnish.logrotate:1.4
--- packages/varnish/varnish.logrotate:1.3	Wed Nov 18 16:17:27 2009
+++ packages/varnish/varnish.logrotate	Wed Nov 18 16:32:44 2009
@@ -1,4 +1,4 @@
-/var/log/varnish/access.log
+# varnishlog
 /var/log/varnish/varnish.log
 {
 	missingok
@@ -6,7 +6,18 @@
 	sharedscripts
 	olddir /var/log/archive/varnish
 	postrotate
-		kill -HUP `cat /var/run/varnish/varnishlog.pid 2>/dev/null` 2> /dev/null || :
-		kill -HUP `cat /var/run/varnish/varnishncsa.pid 2>/dev/null` 2> /dev/null || :
+		/sbin/service varnishlog flush-logs
+	endscript
+}
+
+# varnishncsa log
+/var/log/varnish/access.log
+{
+	missingok
+	notifempty
+	sharedscripts
+	olddir /var/log/archive/varnish
+	postrotate
+		/sbin/service varnishncsa flush-logs
 	endscript
 }
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/varnish/varnish.logrotate?r1=1.3&r2=1.4&f=u



More information about the pld-cvs-commit mailing list