Skip to content

Commit

Permalink
Update redis_init_script.tpl
Browse files Browse the repository at this point in the history
status command currently reports success when redis has crashed and the pid file still exists. Changing to check the actual process is running.
  • Loading branch information
coderholic committed Oct 26, 2014
1 parent 93eed9a commit dab5c09
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions utils/redis_init_script.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit dab5c09

Please sign in to comment.