Fix for the init script provided with Redis, thanks to Rowan. This fixes issue 316

This commit is contained in:
antirez 2010-09-09 10:24:56 +02:00
parent da14590bd9
commit 7f9a4db3c0

View File

@ -21,15 +21,14 @@ case "$1" in
then then
echo -n "$PIDFILE does not exist, process is not running\n" echo -n "$PIDFILE does not exist, process is not running\n"
else else
echo -n "Stopping ...\n"
echo -n "Sending SHUTDOWN\r\n" | nc localhost $REDISPORT &
PID=$(cat $PIDFILE) PID=$(cat $PIDFILE)
echo -n "Stopping ...\n"
echo -n "SHUTDOWN\r\n" | nc localhost $REDISPORT &
while [ -x /proc/${PIDFILE} ] while [ -x /proc/${PIDFILE} ]
do do
echo "Waiting for Redis to shutdown ..." echo "Waiting for Redis to shutdown ..."
sleep 1 sleep 1
done done
rm $PIDFILE
echo "Redis stopped" echo "Redis stopped"
fi fi
;; ;;