From: Elan Ruusamäe Date: Tue, 11 Sep 2007 12:46:40 +0000 (+0000) Subject: - on restart all restart only instances that were up X-Git-Tag: auto/ac/pound-2_3_2-5~1 X-Git-Url: https://git.pld-linux.org/?a=commitdiff_plain;ds=sidebyside;h=194b939de7f7c1cbce9bdef389ccc88689efbee9;p=packages%2Fpound.git - on restart all restart only instances that were up Changed files: pound.init -> 1.12 --- diff --git a/pound.init b/pound.init index 5e065cc..19e8ef2 100644 --- a/pound.init +++ b/pound.init @@ -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]"