mirror of
https://github.com/fluencelabs/redis
synced 2025-06-13 01:01:22 +00:00
Update redis_init_script.tpl
status command currently reports success when redis has crashed and the pid file still exists. Changing to check the actual process is running.
This commit is contained in:
@ -26,11 +26,12 @@ case "$1" in
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
status)
|
status)
|
||||||
if [ ! -f $PIDFILE ]
|
PID=$(cat $PIDFILE)
|
||||||
|
if [ ! -x /proc/${PID} ]
|
||||||
then
|
then
|
||||||
echo 'Redis is not running'
|
echo 'Redis is not running'
|
||||||
else
|
else
|
||||||
echo "Redis is running ($(<$PIDFILE))"
|
echo "Redis is running ($PID)"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
restart)
|
restart)
|
||||||
|
Reference in New Issue
Block a user