Fixed issue in rpm init.d script

This commit is contained in:
Torkel Ödegaard 2015-04-12 15:52:51 +02:00
parent a60bf642e1
commit d4e6ae2804

View File

@ -82,13 +82,14 @@ case "$1" in
# Start Daemon
cd $GRAFANA_HOME
su -s /bin/sh -c "nohup ${DAEMON} ${DAEMON_OPTS} >> /dev/null 3>&1 &" $DAEMON_USER
su -s /bin/sh -c "nohup ${DAEMON} ${DAEMON_OPTS} >> /dev/null 3>&1 &" $GRAFANA_USER
return=$?
if [ $return -eq 0 ]
then
sleep 1
# check if pid file has been written two
if ! [[ -s $PID_FILE ]]; then
echo "FAILED"
exit 3
fi
i=0
@ -98,7 +99,10 @@ case "$1" in
do
sleep 1
i=$(($i + 1))
[ $i -gt $timeout ] && exit 4
if [ $i -gt $timeout ]; then
echo "FAILED"
exit 4
fi
done
fi