summaryrefslogtreecommitdiff
path: root/openvswitch/ovsd
diff options
context:
space:
mode:
authorThomas Penteker <tek@serverop.de>2014-01-30 22:52:52 +0100
committerThomas Penteker <tek@serverop.de>2014-01-30 22:52:52 +0100
commit95dba9b8e83a860cbb722d918b7ee8df402fa36a (patch)
tree757771e380e48d616a5701dd79eee7f8bc3c7718 /openvswitch/ovsd
parent18cf5a596df32707d9ebd9cad2a0fa94860baa52 (diff)
downloadcontrib-95dba9b8e83a860cbb722d918b7ee8df402fa36a.tar.gz
contrib-95dba9b8e83a860cbb722d918b7ee8df402fa36a.tar.xz
openvswitch: initial import
Diffstat (limited to 'openvswitch/ovsd')
-rwxr-xr-xopenvswitch/ovsd40
1 files changed, 40 insertions, 0 deletions
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

Generated by cgit