SOURCES: lighttpd.init - use new feature in 1.4.3 of doing gracefu...

glen glen at pld-linux.org
Sat Sep 3 19:20:43 CEST 2005


Author: glen                         Date: Sat Sep  3 17:20:43 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- use new feature in 1.4.3 of doing graceful shutdown on restart

---- Files affected:
SOURCES:
   lighttpd.init (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SOURCES/lighttpd.init
diff -u SOURCES/lighttpd.init:1.1 SOURCES/lighttpd.init:1.2
--- SOURCES/lighttpd.init:1.1	Thu Mar 25 00:29:21 2004
+++ SOURCES/lighttpd.init	Sat Sep  3 19:20:37 2005
@@ -56,7 +56,13 @@
 	RETVAL=$?
 	;;
   restart)
-  	$0 stop
+	if [ -f /var/lock/subsys/lighttpd ]; then
+		msg_stopping lighttpd
+		# sending INT signal will make lighttpd close all listening sockets and
+		# wait for client connections to terminate.
+		killproc lighttpd -INT
+		rm -f /var/lock/subsys/lighttpd >/dev/null 2>&1
+	fi
 	$0 start
 	;;
   reload|force-reload|graceful)
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/lighttpd.init?r1=1.1&r2=1.2&f=u




More information about the pld-cvs-commit mailing list