Skip to content

Commit 7f9a4db

Browse files
committed
Fix for the init script provided with Redis, thanks to Rowan. This fixes issue 316
1 parent da14590 commit 7f9a4db

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

utils/redis_init_script

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,14 @@ case "$1" in
2121
then
2222
echo -n "$PIDFILE does not exist, process is not running\n"
2323
else
24+
PID=$(cat $PIDFILE)
2425
echo -n "Stopping ...\n"
25-
echo -n "Sending SHUTDOWN\r\n" | nc localhost $REDISPORT &
26-
PID=$(cat $PIDFILE)
26+
echo -n "SHUTDOWN\r\n" | nc localhost $REDISPORT &
2727
while [ -x /proc/${PIDFILE} ]
2828
do
2929
echo "Waiting for Redis to shutdown ..."
3030
sleep 1
3131
done
32-
rm $PIDFILE
3332
echo "Redis stopped"
3433
fi
3534
;;

0 commit comments

Comments
 (0)