X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=debian%2Fopenvswitch-ipsec.init;h=125b50f31e7860a110dd786d39351300a143fe12;hb=d60a2b538a2411019e401a0756c8c0aa1f3b6e98;hp=f3c9a13a0895e3038bef2533e7b47756ca273c04;hpb=a3acf0b0c46a28d6c891086e054d81dd915eea2e;p=sliver-openvswitch.git diff --git a/debian/openvswitch-ipsec.init b/debian/openvswitch-ipsec.init index f3c9a13a0..125b50f31 100755 --- a/debian/openvswitch-ipsec.init +++ b/debian/openvswitch-ipsec.init @@ -19,7 +19,7 @@ # ### BEGIN INIT INFO # Provides: openvswitch-ipsec -# Required-Start: $network $local_fs $remote_fs +# Required-Start: $network $local_fs $remote_fs openvswitch-switch # Required-Stop: $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 @@ -69,9 +69,12 @@ running() { } start_server() { - PYTHONPATH=/usr/share/openvswitch/python \ - /usr/share/openvswitch/scripts/ovs-monitor-ipsec \ - --pidfile-name=$PIDFILE --detach --monitor \ + if [ ! -d /var/run/openvswitch ]; then + install -d -m 755 -o root -g root /var/run/openvswitch + fi + + /usr/share/openvswitch/scripts/ovs-monitor-ipsec \ + --pidfile=$PIDFILE --log-file --detach --monitor \ unix:/var/run/openvswitch/db.sock return 0 @@ -91,10 +94,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 +156,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 $?