stafan did recently some work on stopping of sems.  sems now tries to
close open sessions etc. before actually stopping itself.  as result,
my simple init script to restart sems stopped working, because start
came too fast after stop.

in case someone needs one, here is a restart script that seems to work
reliably.

-- juha

  restart|force-reload)
        echo "Stopping $NAME"
        start-stop-daemon --oknodo --stop --quiet --pidfile \
                $SEMS_PIDFILE --exec $DAEMON
                echo "Waiting for sessions to end ... "
        for i in 1 2 3 4 5; do
            sleep 2
            if [ -f "$SEMS_PIDFILE" ]; then
                continue
            else
                break
            fi
        done
        if [ -f "$SEMS_PIDFILE" ]; then
            set +e
            killall -q -KILL $DAEMON
            set -e
        fi
        echo "Starting $NAME"
        start-stop-daemon --start --quiet --pidfile \
                $SEMS_PIDFILE --exec $DAEMON -- $PARAMS
        echo "."
        ;;
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to