diff options
| author | Mihai Prica <prica.mihai@gmail.com> | 2013-06-11 14:53:44 +0300 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-08-28 18:41:56 -0400 |
| commit | de39adcdbeaa8ed8376ca602bd7a2630de3a5ddf (patch) | |
| tree | 7b32823f85daa1f6d1c90027508266a1584bc868 /meta-openstack/recipes-devtools/python/python-quantum/quantum-server.init | |
| parent | 836997160799682eb16c4410952148b888cc8661 (diff) | |
| download | meta-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-server.init')
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-quantum/quantum-server.init | 73 |
1 files changed, 73 insertions, 0 deletions
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 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | ### BEGIN INIT INFO | ||
| 4 | # Provides: quantum-server | ||
| 5 | # Required-Start: $remote_fs $syslog | ||
| 6 | # Required-Stop: $remote_fs $syslog | ||
| 7 | # Default-Start: 2 3 5 | ||
| 8 | # Default-Stop: 0 1 6 | ||
| 9 | # Short-Description: quantum-server | ||
| 10 | # Description: Provides the Quantum networking service | ||
| 11 | ### END INIT INFO | ||
| 12 | |||
| 13 | DESC="quantum-server" | ||
| 14 | DAEMON="/usr/bin/quantum-server" | ||
| 15 | PIDFILE="/var/run/quantum-server.pid" | ||
| 16 | DAEMON_ARGS="--config-file=/etc/quantum/quantum.conf --config-file=@plugin@" | ||
| 17 | |||
| 18 | start() | ||
| 19 | { | ||
| 20 | if [ -e $PIDFILE ]; then | ||
| 21 | PIDDIR=/proc/$(cat $PIDFILE) | ||
| 22 | if [ -d ${PIDDIR} ]; then | ||
| 23 | echo "$DESC already running." | ||
| 24 | exit 1 | ||
| 25 | else | ||
| 26 | echo "Removing stale PID file $PIDFILE" | ||
| 27 | rm -f $PIDFILE | ||
| 28 | fi | ||
| 29 | fi | ||
| 30 | |||
| 31 | echo -n "Starting $DESC..." | ||
| 32 | |||
| 33 | start-stop-daemon --start --quiet --background \ | ||
| 34 | --pidfile ${PIDFILE} --make-pidfile --exec ${DAEMON} \ | ||
| 35 | -- $DAEMON_ARGS | ||
| 36 | |||
| 37 | if [ $? -eq 0 ]; then | ||
| 38 | echo "done." | ||
| 39 | else | ||
| 40 | echo "failed." | ||
| 41 | fi | ||
| 42 | } | ||
| 43 | |||
| 44 | stop() | ||
| 45 | { | ||
| 46 | echo -n "Stopping $DESC..." | ||
| 47 | start-stop-daemon --stop --quiet --pidfile $PIDFILE | ||
| 48 | if [ $? -eq 0 ]; then | ||
| 49 | echo "done." | ||
| 50 | else | ||
| 51 | echo "failed." | ||
| 52 | fi | ||
| 53 | rm -f $PIDFILE | ||
| 54 | } | ||
| 55 | |||
| 56 | case "$1" in | ||
| 57 | start) | ||
| 58 | start | ||
| 59 | ;; | ||
| 60 | stop) | ||
| 61 | stop | ||
| 62 | ;; | ||
| 63 | restart|force-reload) | ||
| 64 | stop | ||
| 65 | start | ||
| 66 | ;; | ||
| 67 | *) | ||
| 68 | echo "Usage: $0 {start|stop|force-reload|restart}" | ||
| 69 | exit 1 | ||
| 70 | ;; | ||
| 71 | esac | ||
| 72 | |||
| 73 | exit 0 | ||
