-
Notifications
You must be signed in to change notification settings - Fork 0
/
quantum-ovs-cleanup.init
41 lines (35 loc) · 1017 Bytes
/
quantum-ovs-cleanup.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
#!/bin/sh
#
# quantum-ovs-cleanup OpenStack Open vSwitch cleanup utility
#
# chkconfig: - 97 02
# description: Purge Open vSwitch of the Quantum devices
### END INIT INFO
. /etc/rc.d/init.d/functions
proj=quantum
prog=$proj-ovs-cleanup
exec="/usr/bin/$prog"
pidfile="/var/run/$proj/$prog.pid"
config="/etc/$proj/plugins/openvswitch/ovs_quantum_plugin.ini"
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
lockfile=/var/lock/subsys/$prog
start() {
[ -x $exec ] || exit 5
[ -f $config ] || exit 6
daemon --user quantum $exec --log-file /var/log/$proj/ovs-cleanup.log --config-file /etc/$proj/$proj.conf --config-file $config &>/dev/null
retval=$?
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
case "$1" in
start)
$1
;;
stop|restart|reload|force-reload|status|condrestart|try-restart)
# Do nothing
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
exit 2
esac
exit $?