mirror of
https://github.com/grafana/grafana.git
synced 2024-12-30 10:47:30 -06:00
Merge remote-tracking branch 'origin/development'
This commit is contained in:
commit
817f24e6fb
@ -72,8 +72,6 @@ function isRunning() {
|
|||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
echo -n $"Starting $DESC: .... "
|
|
||||||
|
|
||||||
isRunning
|
isRunning
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "Already running."
|
echo "Already running."
|
||||||
@ -90,7 +88,7 @@ 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 &" $GRAFANA_USER 2> /dev/null
|
action $"Starting $DESC: ..." su -s /bin/sh -c "nohup ${DAEMON} ${DAEMON_OPTS} >> /dev/null 3>&1 &" $GRAFANA_USER 2> /dev/null
|
||||||
return=$?
|
return=$?
|
||||||
if [ $return -eq 0 ]
|
if [ $return -eq 0 ]
|
||||||
then
|
then
|
||||||
@ -114,26 +112,25 @@ case "$1" in
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "OK"
|
|
||||||
exit $return
|
exit $return
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
echo -n "Stopping $DESC ..."
|
echo -n "Stopping $DESC: ..."
|
||||||
|
|
||||||
if [ -f "$PID_FILE" ]; then
|
if [ -f "$PID_FILE" ]; then
|
||||||
killproc -p $PID_FILE -d 20 $NAME
|
killproc -p $PID_FILE -d 20 $NAME
|
||||||
if [ $? -eq 1 ]; then
|
if [ $? -eq 1 ]; then
|
||||||
echo -n "$DESC is not running but pid file exists, cleaning up"
|
echo "$DESC is not running but pid file exists, cleaning up"
|
||||||
elif [ $? -eq 3 ]; then
|
elif [ $? -eq 3 ]; then
|
||||||
PID="`cat $PID_FILE`"
|
PID="`cat $PID_FILE`"
|
||||||
echo -n "Failed to stop $DESC (pid $PID)"
|
echo "Failed to stop $DESC (pid $PID)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
rm -f "$PID_FILE"
|
rm -f "$PID_FILE"
|
||||||
echo "OK"
|
echo ""
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo -n "(not running)"
|
echo "(not running)"
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user