From: Michal Fojtik <mfoj...@redhat.com>
Signed-off-by: Michal fojtik <mfoj...@redhat.com> --- server/support/fedora/deltacloud-core.init | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/server/support/fedora/deltacloud-core.init b/server/support/fedora/deltacloud-core.init index 2b2fb56..ca1e1da 100755 --- a/server/support/fedora/deltacloud-core.init +++ b/server/support/fedora/deltacloud-core.init @@ -7,13 +7,13 @@ ### BEGIN INIT INFO # Provides: deltacloud-core -# Required-Start: -# Required-Stop: -# Default-Start: 3 5 -# Default-Stop: 0 1 2 6 +# Required-Start: +# Required-Stop: +# Default-Start: 3 5 +# Default-Stop: 0 1 2 6 # Short-Description: Deltacloud Core API deamon # Description: Deltacloud Core API provides access to different cloud providers \ -# using single REST API +# using single REST API ### END INIT INFO . /etc/rc.d/init.d/functions @@ -33,6 +33,7 @@ HOST="${HOST:-localhost}" DELTACLOUD_USER="${DELTACLOUD_USER:-nobody}" LOGFILE="${LOGFILE:-/var/log/$prog/$DRIVER.log}" LOCKFILE="${LOCKFILE:-/var/lock/subsys/$prog}" +PIDFILE="${PIDFILE:-/var/run/deltacloud-core-$DRIVER.pid}" [ -r $LOGFILE ] && chown nobody $LOGFILE [ -r $LOCKFILE ] && chown nobody $LOCKFILE @@ -47,7 +48,7 @@ start() { # the process. Note that for systemd, this has no real effect; # systemd always starts initscripts with a clean environment and PWD of / cd / - daemon --user "$DELTACLOUD_USER" "$exec -i $DRIVER -e $API_ENV --port $PORT -r $HOST >> $LOGFILE 2>&1 &" + daemon --user "$DELTACLOUD_USER" "$exec -i $DRIVER -e $API_ENV --port $PORT -r $HOST --pid $PIDFILE >> $LOGFILE 2>&1 &" retval=$? if [ $retval -eq 0 ] && touch $LOCKFILE ; then -- 1.7.4.4