Skip to content
Browse files

Fix for the init script provided with Redis, thanks to Rowan. This fi…

…xes issue 316
  • Loading branch information...
1 parent 55f6287 commit b2e16cb0c8c4c3c3f8f64a7dca60131ffb4bb55d @antirez committed
Showing with 2 additions and 3 deletions.
  1. +2 −3 utils/redis_init_script
View
5 utils/redis_init_script
@@ -21,15 +21,14 @@ case "$1" in
then
echo -n "$PIDFILE does not exist, process is not running\n"
else
+ PID=$(cat $PIDFILE)
echo -n "Stopping ...\n"
- echo -n "Sending SHUTDOWN\r\n" | nc localhost $REDISPORT &
- PID=$(cat $PIDFILE)
+ echo -n "SHUTDOWN\r\n" | nc localhost $REDISPORT &
while [ -x /proc/${PIDFILE} ]
do
echo "Waiting for Redis to shutdown ..."
sleep 1
done
- rm $PIDFILE
echo "Redis stopped"
fi
;;

0 comments on commit b2e16cb

Please sign in to comment.
Something went wrong with that request. Please try again.