Commit dab5c09a authored by Ben Dowling's avatar Ben Dowling
Browse files

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.
parent 93eed9ae
...@@ -26,11 +26,12 @@ case "$1" 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)
......
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