Commit d4e6ae28 by Torkel Ödegaard

Fixed issue in rpm init.d script

parent a60bf642
...@@ -82,13 +82,14 @@ case "$1" in ...@@ -82,13 +82,14 @@ case "$1" in
# Start Daemon # Start Daemon
cd $GRAFANA_HOME 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=$? return=$?
if [ $return -eq 0 ] if [ $return -eq 0 ]
then then
sleep 1 sleep 1
# check if pid file has been written two # check if pid file has been written two
if ! [[ -s $PID_FILE ]]; then if ! [[ -s $PID_FILE ]]; then
echo "FAILED"
exit 3 exit 3
fi fi
i=0 i=0
...@@ -98,7 +99,10 @@ case "$1" in ...@@ -98,7 +99,10 @@ case "$1" in
do do
sleep 1 sleep 1
i=$(($i + 1)) i=$(($i + 1))
[ $i -gt $timeout ] && exit 4 if [ $i -gt $timeout ]; then
echo "FAILED"
exit 4
fi
done done
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment