Cherry-pick from release-0.4
* made code preparations for build * Changed config file prefix as for other components Change-Id: I7169b38c425b411fd3f93fd868c906e6edcd7db4
This commit is contained in:
parent
b472670019
commit
8e9da4cacb
98
etc/init.d/murano-conductor-el6
Executable file
98
etc/init.d/murano-conductor-el6
Executable file
@ -0,0 +1,98 @@
|
||||
#!/bin/sh
|
||||
# Copyright (c) 2013 Mirantis, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# Author: Igor Yozhikov <iyozhikov@mirantis.com>
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: murano-conductor
|
||||
# Required-Start: $network $local_fs $remote_fs $syslog
|
||||
# Required-Stop: $remote_fs
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: OpenStack Murano Conductor Server
|
||||
# Description: This startup script launches murano-conductor service daemon.
|
||||
### END INIT INFO
|
||||
# chkconfig: 3 90 10
|
||||
# description: This startup script launches murano-conductor service daemon.
|
||||
# config: /etc/murano/murano-conductor.conf, /etc/murano/murano-conductor-paste.ini
|
||||
#
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin
|
||||
DESC="murano-conductor"
|
||||
NAME=murano-conductor
|
||||
DAEMON=$(which muranoconductor)
|
||||
PIDFILE=/var/run/$NAME.pid
|
||||
SCRIPTNAME=/etc/init.d/openstack-$NAME
|
||||
SYSTEM_USER=root
|
||||
CONFIG_FILE=/etc/murano/murano-conductor.conf
|
||||
LOCKFILE=/var/lock/subsys/$NAME
|
||||
# Exit if the package is not installed
|
||||
[ -x $DAEMON ] || exit 5
|
||||
|
||||
# source function library
|
||||
. /etc/init.d/functions
|
||||
|
||||
RETVAL=0
|
||||
|
||||
|
||||
start() {
|
||||
echo -n "Starting $NAME: "
|
||||
daemon --user $SYSTEM_USER "$DAEMON --config-file=$CONFIG_FILE &>/dev/null & echo \$! > $PIDFILE"
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && touch $LOCKFILE
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n "Stopping $NAME: "
|
||||
#killproc $DAEMON -TERM
|
||||
killproc -p $PIDFILE $DAEMON
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && rm -f $LOCKFILE
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
rh_status() {
|
||||
# run checks to determine if the service is running or use generic status
|
||||
status $DAEMON
|
||||
}
|
||||
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
|
||||
restart)
|
||||
restart
|
||||
;;
|
||||
|
||||
status)
|
||||
rh_status
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|status|restart}"
|
||||
exit 2
|
||||
esac
|
||||
exit $?
|
Loading…
x
Reference in New Issue
Block a user