]> git.proxmox.com Git - mirror_ovs.git/blob - debian/ovn-central.init
debian: Add a package for OVN central components.
[mirror_ovs.git] / debian / ovn-central.init
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
15 test -x /usr/bin/ovn-northd || 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-central ]; then
22 . /etc/default/ovn-central
23 fi
24
25 start () {
26 set /usr/share/openvswitch/scripts/ovn-ctl ${1-start_northd}
27 set "$@" $OVN_CTL_OPTS
28 "$@" || exit $?
29 }
30
31 case $1 in
32 start)
33 start
34 ;;
35 stop)
36 /usr/share/openvswitch/scripts/ovn-ctl stop_northd
37 ;;
38 restart)
39 start restart_northd
40 ;;
41 reload | force-reload)
42 ;;
43 status)
44 /usr/share/openvswitch/scripts/ovn-ctl status_northd
45 exit $?
46 ;;
47 *)
48 echo "Usage: $0 {start|stop|reload|force-reload|restart|status}" >&2
49 exit 1
50 ;;
51 esac
52
53 exit 0