packages: varnish/varnishncsa.init - add reload

glen glen at pld-linux.org
Mon Jul 20 15:41:43 CEST 2009


Author: glen                         Date: Mon Jul 20 13:41:43 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- add reload

---- Files affected:
packages/varnish:
   varnishncsa.init (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: packages/varnish/varnishncsa.init
diff -u packages/varnish/varnishncsa.init:1.1 packages/varnish/varnishncsa.init:1.2
--- packages/varnish/varnishncsa.init:1.1	Mon Jul 20 15:31:23 2009
+++ packages/varnish/varnishncsa.init	Mon Jul 20 15:41:38 2009
@@ -56,14 +56,25 @@
 	start
 }
 
+reload() {
+	if [ ! -f /var/lock/subsys/varnishncsa ]; then
+		msg_not_running "Varnish NCSA logging daemon"
+		RETVAL=7
+		return
+	fi
+
+	msg_reloading "Varnish NCSA logging daemon"
+	killproc --pidfile $pidfile varnishncsa -HUP
+}
+
 RETVAL=0
 # See how we were called.
 case "$1" in
   start)
-  	start
+	start
 	;;
   stop)
-  	stop
+	stop
 	;;
   restart)
 	stop
@@ -72,8 +83,8 @@
   try-restart)
 	condrestart 0
 	;;
-  force-reload)
-	condrestart 7
+  reload|force-reload)
+	reload
 	;;
   status)
 	status varnishncsa
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/varnish/varnishncsa.init?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list