From 53bb70159334a0219b3212ddfb5027b1b571b3a7 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Tue, 12 Nov 2013 23:49:08 -0500 Subject: heat: introduce python-heat, heat-engine, heat-api* Introducing the OpenStack Havana heat component. This initial integration covers the basic integration with keystone and horizon, but does not fully enable stack management. Subsequent updates will enable the full functionality. Signed-off-by: Bruce Ashfield --- .../recipes-devtools/python/python-heat/heat.init | 83 ++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 meta-openstack/recipes-devtools/python/python-heat/heat.init (limited to 'meta-openstack/recipes-devtools/python/python-heat/heat.init') diff --git a/meta-openstack/recipes-devtools/python/python-heat/heat.init b/meta-openstack/recipes-devtools/python/python-heat/heat.init new file mode 100644 index 0000000..452691a --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-heat/heat.init @@ -0,0 +1,83 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: +# Required-Start: $remote_fs $network $syslog +# Required-Stop: $remote_fs $syslog +# Default-Stop: 0 1 6 +# Short-Description: Heat Servers +# Description: OpenStack Orchestration Service (code-named heat) +### END INIT INFO + +SUFFIX="@suffix@" +CONFIG="/etc/heat/heat.conf" +if [ -n "$SUFFIX" ]; then + DAEMON="/usr/bin/heat-$SUFFIX" + DESC="heat-$SUFFIX" + PIDFILE="/var/run/heat-$SUFFIX.pid" +else + DAEMON="/usr/bin/heat" + DESC="heat" + PIDFILE="/var/run/heat.pid" +fi + +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 + + if [ ! -d /var/log/heat ]; then + mkdir /var/log/heat + fi + + echo -n "Starting $DESC..." + + start-stop-daemon --start --quiet --background \ + --pidfile ${PIDFILE} --make-pidfile --exec ${DAEMON} \ + -- --config-file $CONFIG + + 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