summaryrefslogtreecommitdiff
path: root/openvswitch/ovsd
blob: cf74a9a7cb862562bd53f8b3f5d156d6be9e82bd (plain)
    1 #!/bin/sh
    2 
    3 case $1 in
    4   start)
    5     ovsdb-server --remote=punix:/var/run/openvswitch/db.sock \
    6       --remote=db:Open_vSwitch,Open_vSwitch,manager_options \
    7       --private-key=db:Open_vSwitch,SSL,private_key \
    8       --certificate=db:Open_vSwitch,SSL,certificate \
    9       --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert \
   10       --pidfile --detach \
   11       --log-file
   12     ovs-vswitchd --pidfile --detach --log-file
   13     ;;
   14   stop)
   15     PIDFILE=/var/run/openvswitch/ovsdb-server.pid
   16     if [ -f "$PIDFILE" ]; then
   17       kill $(< $PIDFILE)
   18       rm -f "$PIDFILE"
   19     else
   20       killall -q /usr/sbin/ovsdb-server
   21     fi
   22     PIDFILE=/var/run/openvswitch/ovs-vswitchd.pid
   23     if [ -f "$PIDFILE" ]; then
   24       kill $(< $PIDFILE)
   25       rm -f "$PIDFILE"
   26     else
   27       killall -q /usr/sbin/ovs-vswitchd
   28     fi
   29 ;;
   30   restart)
   31     $0 stop
   32     sleep 2
   33     $0 start
   34     ;;
   35   *)
   36     echo "usage: $0 [start|stop|restart]"
   37     ;;
   38 esac
   39 
   40 # End of file

Generated by cgit