summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-quantum/quantum-agent.init
diff options
context:
space:
mode:
authorMihai Prica <prica.mihai@gmail.com>2013-06-11 14:53:44 +0300
committerBruce Ashfield <bruce.ashfield@windriver.com>2013-08-28 18:41:56 -0400
commitde39adcdbeaa8ed8376ca602bd7a2630de3a5ddf (patch)
tree7b32823f85daa1f6d1c90027508266a1584bc868 /meta-openstack/recipes-devtools/python/python-quantum/quantum-agent.init
parent836997160799682eb16c4410952148b888cc8661 (diff)
downloadmeta-cloud-services-de39adcdbeaa8ed8376ca602bd7a2630de3a5ddf.tar.gz
python-quantum: added 2013.1
-Modified the sample configuration files with necessary credentials. -Created initscript for the quantum server. -Configured the openvswitch and linuxbridge plugin agents. Signed-off-by: Mihai Prica <prica.mihai@gmail.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-quantum/quantum-agent.init')
-rw-r--r--meta-openstack/recipes-devtools/python/python-quantum/quantum-agent.init70
1 files changed, 70 insertions, 0 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-quantum/quantum-agent.init b/meta-openstack/recipes-devtools/python/python-quantum/quantum-agent.init
new file mode 100644
index 0000000..1a33d06
--- /dev/null
+++ b/meta-openstack/recipes-devtools/python/python-quantum/quantum-agent.init
@@ -0,0 +1,70 @@
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="quantum-$SUFFIX-agent"
13DAEMON="/usr/bin/quantum-$SUFFIX-agent"
14PIDFILE="/var/run/quantum-$SUFFIX-agent.pid"
15
16start()
17{
18 if [ -e $PIDFILE ]; then
19 PIDDIR=/proc/$(cat $PIDFILE)
20 if [ -d ${PIDDIR} ]; then
21 echo "$DESC already running."
22 exit 1
23 else
24 echo "Removing stale PID file $PIDFILE"
25 rm -f $PIDFILE
26 fi
27 fi
28
29 echo -n "Starting $DESC..."
30
31 start-stop-daemon --start --quiet --background \
32 --pidfile ${PIDFILE} --make-pidfile --exec ${DAEMON}
33
34 if [ $? -eq 0 ]; then
35 echo "done."
36 else
37 echo "failed."
38 fi
39}
40
41stop()
42{
43 echo -n "Stopping $DESC..."
44 start-stop-daemon --stop --quiet --pidfile $PIDFILE
45 if [ $? -eq 0 ]; then
46 echo "done."
47 else
48 echo "failed."
49 fi
50 rm -f $PIDFILE
51}
52
53case "$1" in
54 start)
55 start
56 ;;
57 stop)
58 stop
59 ;;
60 restart|force-reload)
61 stop
62 start
63 ;;
64 *)
65 echo "Usage: $0 {start|stop|force-reload|restart}"
66 exit 1
67 ;;
68esac
69
70exit 0