]> git.proxmox.com Git - mirror_ovs.git/blame - debian/ovn-central.init
Prepare for 2.6.0.
[mirror_ovs.git] / debian / ovn-central.init
CommitLineData
86d9ab04
GS
1#! /bin/sh
2#
3### BEGIN INIT INFO
4# Provides: ovn-central
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 central components
10# Description: ovn-central provides the userspace daemons,
11# utilities and databases for OVN that is run at a central
12# location.
13### END INIT INFO
14
15test -x /usr/bin/ovn-northd || 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-central ]; then
22 . /etc/default/ovn-central
23fi
24
25start () {
26 set /usr/share/openvswitch/scripts/ovn-ctl ${1-start_northd}
27 set "$@" $OVN_CTL_OPTS
28 "$@" || exit $?
29}
30
60bdd011
RM
31stop_northd () {
32 set /usr/share/openvswitch/scripts/ovn-ctl ${1-stop_northd}
33 set "$@" $OVN_CTL_OPTS
34 "$@" || exit $?
35}
36
86d9ab04
GS
37case $1 in
38 start)
39 start
40 ;;
41 stop)
60bdd011 42 stop_northd
86d9ab04
GS
43 ;;
44 restart)
45 start restart_northd
46 ;;
47 reload | force-reload)
48 ;;
49 status)
50 /usr/share/openvswitch/scripts/ovn-ctl status_northd
51 exit $?
52 ;;
53 *)
54 echo "Usage: $0 {start|stop|reload|force-reload|restart|status}" >&2
55 exit 1
56 ;;
57esac
58
59exit 0