packages: varnish/varnishlog.init - add flush-logs target
glen
glen at pld-linux.org
Wed Nov 18 16:31:24 CET 2009
Author: glen Date: Wed Nov 18 15:31:24 2009 GMT
Module: packages Tag: HEAD
---- Log message:
- add flush-logs target
---- Files affected:
packages/varnish:
varnishlog.init (1.5 -> 1.6)
---- Diffs:
================================================================
Index: packages/varnish/varnishlog.init
diff -u packages/varnish/varnishlog.init:1.5 packages/varnish/varnishlog.init:1.6
--- packages/varnish/varnishlog.init:1.5 Fri Nov 6 12:38:29 2009
+++ packages/varnish/varnishlog.init Wed Nov 18 16:31:18 2009
@@ -67,6 +67,17 @@
killproc --pidfile $pidfile varnishlog -HUP
}
+flush-logs() {
+ if [ ! -f /var/lock/subsys/varnishncsa ]; then
+ msg_not_running "Varnish logging daemon"
+ return
+ fi
+
+ show "Rotating %s logs" "Varnish logging daemon"
+ killproc --pidfile $pidfile varnishlog -HUP
+ RETVAL=$?
+}
+
RETVAL=0
# See how we were called.
case "$1" in
@@ -86,12 +97,15 @@
reload|force-reload)
reload
;;
+ flush-logs)
+ flush-logs
+ ;;
status)
status varnishlog
RETVAL=$?
;;
*)
- msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
+ msg_usage "$0 {start|stop|restart|try-restart|force-reload|flush-logs|status}"
exit 3
esac
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/varnish/varnishlog.init?r1=1.5&r2=1.6&f=u
More information about the pld-cvs-commit
mailing list