]> git.proxmox.com Git - mirror_ovs.git/blame - debian/ovn-host.init
Prepare for 2.6.0.
[mirror_ovs.git] / debian / ovn-host.init
CommitLineData
5629723d
GS
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
15test -x /usr/bin/ovn-controller || exit 0
16test -x /usr/share/openvswitch/scripts/ovn-ctl || exit 0
17
18_SYSTEMCTL_SKIP_REDIRECT=yes
19
20. /usr/share/openvswitch/scripts/ovs-lib
21if [ -e /etc/default/ovn-host ]; then
22 . /etc/default/ovn-host
23fi
24
25start () {
26 set /usr/share/openvswitch/scripts/ovn-ctl ${1-start_controller}
27 set "$@" $OVN_CTL_OPTS
28 "$@" || exit $?
29}
30
31case $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 ;;
51esac
52
53exit 0