]> git.proxmox.com Git - mirror_ovs.git/blob - debian/ovn-host.init
Set release date for 2.7.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
20 . /usr/share/openvswitch/scripts/ovs-lib
21 if [ -e /etc/default/ovn-host ]; then
22 . /etc/default/ovn-host
23 fi
24
25 start () {
26 set /usr/share/openvswitch/scripts/ovn-ctl ${1-start_controller}
27 set "$@" $OVN_CTL_OPTS
28 "$@" || exit $?
29 }
30
31 case $1 in
32 start)
33 start
34 ;;
35 stop | force-stop)
36 /usr/share/openvswitch/scripts/ovn-ctl stop_controller
37 ;;
38 restart)
39 start restart_controller
40 ;;
41 status)
42 /usr/share/openvswitch/scripts/ovn-ctl status_controller
43 exit $?
44 ;;
45 reload | force-reload)
46 ;;
47 *)
48 echo "Usage: $0 {start|stop|reload|force-reload|restart|status}" >&2
49 exit 1
50 ;;
51 esac
52
53 exit 0