X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=debian%2Fopenvswitch-ipsec.init;h=ba82f5139017157baa4703e49a223bbd848f75a0;hb=78a04c9fc2b426231f3aedf8961491b238fc78bb;hp=f3c9a13a0895e3038bef2533e7b47756ca273c04;hpb=a3acf0b0c46a28d6c891086e054d81dd915eea2e;p=openvswitch diff --git a/debian/openvswitch-ipsec.init b/debian/openvswitch-ipsec.init index f3c9a13a..ba82f513 100755 --- a/debian/openvswitch-ipsec.init +++ b/debian/openvswitch-ipsec.init @@ -69,6 +69,10 @@ running() { } start_server() { + if [ ! -d /var/run/openvswitch ]; then + install -d -m 755 -o root -g root /var/run/openvswitch + fi + PYTHONPATH=/usr/share/openvswitch/python \ /usr/share/openvswitch/scripts/ovs-monitor-ipsec \ --pidfile-name=$PIDFILE --detach --monitor \ @@ -91,10 +95,10 @@ force_stop() { if running ; then kill -15 $pid # Is it really dead? - sleep "$DIETIME"s + sleep "$DODTIME" if running ; then kill -9 $pid - sleep "$DIETIME"s + sleep "$DODTIME" if running ; then echo "Cannot kill $NAME (pid=$pid)!" exit 1 @@ -153,7 +157,7 @@ case "$1" in log_daemon_msg "Restarting $NAME" stop_server # Wait some sensible amount, some server need this - [ -n "$DIETIME" ] && sleep $DIETIME + [ -n "$DODTIME" ] && sleep $DODTIME start_server running log_end_msg $?