From 95dba9b8e83a860cbb722d918b7ee8df402fa36a Mon Sep 17 00:00:00 2001 From: Thomas Penteker Date: Thu, 30 Jan 2014 22:52:52 +0100 Subject: openvswitch: initial import --- openvswitch/ovsd | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 openvswitch/ovsd (limited to 'openvswitch/ovsd') diff --git a/openvswitch/ovsd b/openvswitch/ovsd new file mode 100755 index 000000000..cf74a9a7c --- /dev/null +++ b/openvswitch/ovsd @@ -0,0 +1,40 @@ +#!/bin/sh + +case $1 in + start) + ovsdb-server --remote=punix:/var/run/openvswitch/db.sock \ + --remote=db:Open_vSwitch,Open_vSwitch,manager_options \ + --private-key=db:Open_vSwitch,SSL,private_key \ + --certificate=db:Open_vSwitch,SSL,certificate \ + --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert \ + --pidfile --detach \ + --log-file + ovs-vswitchd --pidfile --detach --log-file + ;; + stop) + PIDFILE=/var/run/openvswitch/ovsdb-server.pid + if [ -f "$PIDFILE" ]; then + kill $(< $PIDFILE) + rm -f "$PIDFILE" + else + killall -q /usr/sbin/ovsdb-server + fi + PIDFILE=/var/run/openvswitch/ovs-vswitchd.pid + if [ -f "$PIDFILE" ]; then + kill $(< $PIDFILE) + rm -f "$PIDFILE" + else + killall -q /usr/sbin/ovs-vswitchd + fi +;; + restart) + $0 stop + sleep 2 + $0 start + ;; + *) + echo "usage: $0 [start|stop|restart]" + ;; +esac + +# End of file -- cgit v1.2.3