]> git.proxmox.com Git - mirror_ovs.git/blob - debian/ovn-host.init
Prepare for 2.8.0.
[mirror_ovs.git] / debian / ovn-host.init
1 #! /bin/sh
2 #
3 ### BEGIN INIT INFO
4 # Provides: ovn-host
5 # Required-Start: openvswitch-switch $remote_fs $syslog
6 # Required-Stop: $remote_fs
7 # Default-Start: 2 3 4 5
8 # Default-Stop: 0 1 6
9 # Short-Description: OVN host components
10 # Description: ovn-host provides the userspace
11 # components and utilities for OVN that can be run on
12 # every host/hypervisor.
13 ### END INIT INFO
14
15 test -x /usr/bin/ovn-controller || exit 0
16 test -x /usr/share/openvswitch/scripts/ovn-ctl || exit 0
17
18 _SYSTEMCTL_SKIP_REDIRECT=yes
19 SYSTEMCTL_SKIP_REDIRECT=yes
20
21 . /usr/share/openvswitch/scripts/ovs-lib
22 if [ -e /etc/default/ovn-host ]; then
23 . /etc/default/ovn-host
24 fi
25
26 start () {
27 set /usr/share/openvswitch/scripts/ovn-ctl ${1-start_controller}
28 set "$@" $OVN_CTL_OPTS
29 "$@" || exit $?
30 }
31
32 case $1 in
33 start)
34 start
35 ;;
36 stop | force-stop)
37 /usr/share/openvswitch/scripts/ovn-ctl stop_controller
38 ;;
39 restart)
40 start restart_controller
41 ;;
42 status)
43 /usr/share/openvswitch/scripts/ovn-ctl status_controller
44 exit $?
45 ;;
46 reload | force-reload)
47 ;;
48 *)
49 echo "Usage: $0 {start|stop|reload|force-reload|restart|status}" >&2
50 exit 1
51 ;;
52 esac
53
54 exit 0