From de39adcdbeaa8ed8376ca602bd7a2630de3a5ddf Mon Sep 17 00:00:00 2001 From: Mihai Prica Date: Tue, 11 Jun 2013 14:53:44 +0300 Subject: 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 --- .../python/python-quantum/quantum-server.init | 73 ++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 meta-openstack/recipes-devtools/python/python-quantum/quantum-server.init (limited to 'meta-openstack/recipes-devtools/python/python-quantum/quantum-server.init') diff --git a/meta-openstack/recipes-devtools/python/python-quantum/quantum-server.init b/meta-openstack/recipes-devtools/python/python-quantum/quantum-server.init new file mode 100644 index 0000000..e85bc48 --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-quantum/quantum-server.init @@ -0,0 +1,73 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: quantum-server +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 5 +# Default-Stop: 0 1 6 +# Short-Description: quantum-server +# Description: Provides the Quantum networking service +### END INIT INFO + +DESC="quantum-server" +DAEMON="/usr/bin/quantum-server" +PIDFILE="/var/run/quantum-server.pid" +DAEMON_ARGS="--config-file=/etc/quantum/quantum.conf --config-file=@plugin@" + +start() +{ + if [ -e $PIDFILE ]; then + PIDDIR=/proc/$(cat $PIDFILE) + if [ -d ${PIDDIR} ]; then + echo "$DESC already running." + exit 1 + else + echo "Removing stale PID file $PIDFILE" + rm -f $PIDFILE + fi + fi + + echo -n "Starting $DESC..." + + start-stop-daemon --start --quiet --background \ + --pidfile ${PIDFILE} --make-pidfile --exec ${DAEMON} \ + -- $DAEMON_ARGS + + if [ $? -eq 0 ]; then + echo "done." + else + echo "failed." + fi +} + +stop() +{ + echo -n "Stopping $DESC..." + start-stop-daemon --stop --quiet --pidfile $PIDFILE + if [ $? -eq 0 ]; then + echo "done." + else + echo "failed." + fi + rm -f $PIDFILE +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|force-reload) + stop + start + ;; + *) + echo "Usage: $0 {start|stop|force-reload|restart}" + exit 1 + ;; +esac + +exit 0 -- cgit v1.2.3-54-g00ecf