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:
Ben Dowling
2014-12-11 15:21:28 +01:00
committed by antirez
parent cc14d7f51d
commit 94d9482b61
+3 -2
View File
@@ -26,11 +26,12 @@ case "$1" in
fi
;;
status)
if [ ! -f $PIDFILE ]
PID=$(cat $PIDFILE)
if [ ! -x /proc/${PID} ]
then
echo 'Redis is not running'
else
echo "Redis is running ($(<$PIDFILE))"
echo "Redis is running ($PID)"
fi
;;
restart)