summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-neutron/neutron-agent.init
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-neutron/neutron-agent.init')
-rw-r--r--meta-openstack/recipes-devtools/python/python-neutron/neutron-agent.init91
1 files changed, 0 insertions, 91 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-neutron/neutron-agent.init b/meta-openstack/recipes-devtools/python/python-neutron/neutron-agent.init
deleted file mode 100644
index c9d8d72..0000000
--- a/meta-openstack/recipes-devtools/python/python-neutron/neutron-agent.init
+++ /dev/null
@@ -1,91 +0,0 @@
1#! /bin/sh
2
3### BEGIN INIT INFO
4# Required-Start: $remote_fs $syslog
5# Required-Stop: $remote_fs $syslog
6# Default-Start: 2 3 5
7# Default-Stop: 0 1 6
8# Description: Quantum networking agent
9### END INIT INFO
10
11SUFFIX=@suffix@
12DESC="neutron-$SUFFIX-agent"
13DAEMON="/usr/bin/neutron-$SUFFIX-agent"
14PIDFILE="/var/run/neutron-$SUFFIX-agent.pid"
15DAEMON_ARGS="@args@"
16
17start()
18{
19 if [ -e $PIDFILE ]; then
20 PIDDIR=/proc/$(cat $PIDFILE)
21 if [ -d ${PIDDIR} ]; then
22 echo "$DESC already running."
23 exit 1
24 else
25 echo "Removing stale PID file $PIDFILE"
26 rm -f $PIDFILE
27 fi
28 fi
29
30 if [ ! -d /var/log/neutron ]; then
31 mkdir -p /var/log/neutron
32 fi
33
34 echo -n "Starting $DESC..."
35
36 start-stop-daemon --start --quiet --background \
37 --pidfile ${PIDFILE} --make-pidfile --exec ${DAEMON} \
38 -- ${DAEMON_ARGS} --log-dir=/var/log/neutron
39
40 if [ $? -eq 0 ]; then
41 echo "done."
42 else
43 echo "failed."
44 fi
45}
46
47stop()
48{
49 echo -n "Stopping $DESC..."
50 start-stop-daemon --stop --quiet --pidfile $PIDFILE
51 if [ $? -eq 0 ]; then
52 echo "done."
53 else
54 echo "failed."
55 fi
56 rm -f $PIDFILE
57}
58
59status()
60{
61 pid=`cat $PIDFILE 2>/dev/null`
62 if [ -n "$pid" ]; then
63 if ps -p $pid > /dev/null 2>&1 ; then
64 echo "$DESC is running"
65 return
66 fi
67 fi
68 echo "$DESC is not running"
69}
70
71case "$1" in
72 start)
73 start
74 ;;
75 stop)
76 stop
77 ;;
78 restart|force-reload|reload|reset)
79 stop
80 start
81 ;;
82 status)
83 status
84 ;;
85 *)
86 echo "Usage: $0 {start|stop|force-reload|restart|reload|status|reset}"
87 exit 1
88 ;;
89esac
90
91exit 0