--- /dev/null
+#!/bin/bash
+
+PIDF=/usr/local/var/run/openvswitch/ovsdb-server.pid
+
+if [ ! -f "$PIDF" ]; then
+ sudo ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock \
+ --remote=db:Open_vSwitch,manager_options \
+ --private-key=db:SSL,private_key \
+ --certificate=db:SSL,certificate \
+ --bootstrap-ca-cert=db:SSL,ca_cert \
+ --pidfile --detach
+fi
+while [ ! -f "$PIDF" ]; do
+ echo "Waiting for ovsdb-server to start..." >&2
+ sleep 1;
+done
+cat "$PIDF"