]> git.pld-linux.org Git - packages/pound.git/commitdiff
- on restart all restart only instances that were up
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 11 Sep 2007 12:46:40 +0000 (12:46 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    pound.init -> 1.12

pound.init

index 5e065ccb11a5f5ea97ecd861c7df1ee724d85b61..19e8ef29e4fda7d0d9f1cc9a3fab532eaca17c0b 100644 (file)
@@ -81,6 +81,21 @@ stop() {
        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 @@ case "$1" in
        exit $stat
        ;;
   restart|force-reload)
-       stop
-       start
+       restart
        ;;
   *)
        msg_usage "$0 {start|stop|restart|force-reload|status} [INSTANCE NAMES]"
This page took 0.892752 seconds and 4 git commands to generate.