SOURCES: pound.init - on restart all restart only instances that w...

glen glen at pld-linux.org
Tue Sep 11 14:46:45 CEST 2007


Author: glen                         Date: Tue Sep 11 12:46:45 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- on restart all restart only instances that were up

---- Files affected:
SOURCES:
   pound.init (1.11 -> 1.12) 

---- Diffs:

================================================================
Index: SOURCES/pound.init
diff -u SOURCES/pound.init:1.11 SOURCES/pound.init:1.12
--- SOURCES/pound.init:1.11	Tue Sep 11 14:27:40 2007
+++ SOURCES/pound.init	Tue Sep 11 14:46:40 2007
@@ -81,6 +81,21 @@
 	fi
 }
 
+restart() {
+	if [ "$single" != 1 ]; then
+		# make up list of configured and up instances
+		local list
+		for instance in $POUND_INSTANCES; do
+			is_up $instance || continue
+			list="$list $instance"
+		done
+		POUND_INSTANCES=$list
+	fi
+
+	stop
+	start
+}
+
 if [ "$1" != status -a "$2" ]; then
 	POUND_INSTANCES="$2"
 	single=1
@@ -111,8 +126,7 @@
 	exit $stat
 	;;
   restart|force-reload)
-	stop
-	start
+	restart
 	;;
   *)
 	msg_usage "$0 {start|stop|restart|force-reload|status} [INSTANCE NAMES]"
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/pound.init?r1=1.11&r2=1.12&f=u



More information about the pld-cvs-commit mailing list