-
Notifications
You must be signed in to change notification settings - Fork 17
/
ovn-central.init
executable file
·59 lines (52 loc) · 1.32 KB
/
ovn-central.init
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#! /bin/sh
#
### BEGIN INIT INFO
# Provides: ovn-central
# Required-Start: openvswitch-switch $remote_fs $syslog
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: OVN central components
# Description: ovn-central provides the userspace daemons,
# utilities and databases for OVN that is run at a central
# location.
### END INIT INFO
test -x /usr/bin/ovn-northd || exit 0
test -x /usr/share/openvswitch/scripts/ovn-ctl || exit 0
_SYSTEMCTL_SKIP_REDIRECT=yes
. /usr/share/openvswitch/scripts/ovs-lib
if [ -e /etc/default/ovn-central ]; then
. /etc/default/ovn-central
fi
start () {
set /usr/share/openvswitch/scripts/ovn-ctl ${1-start_northd}
set "$@" $OVN_CTL_OPTS
"$@" || exit $?
}
stop_northd () {
set /usr/share/openvswitch/scripts/ovn-ctl ${1-stop_northd}
set "$@" $OVN_CTL_OPTS
"$@" || exit $?
}
case $1 in
start)
start
;;
stop)
stop_northd
;;
restart)
start restart_northd
;;
reload | force-reload)
;;
status)
/usr/share/openvswitch/scripts/ovn-ctl status_northd
exit $?
;;
*)
echo "Usage: $0 {start|stop|reload|force-reload|restart|status}" >&2
exit 1
;;
esac
exit 0