summaryrefslogtreecommitdiff
path: root/community/redis/redis.d
diff options
context:
space:
mode:
Diffstat (limited to 'community/redis/redis.d')
-rw-r--r--community/redis/redis.d5
1 files changed, 5 insertions, 0 deletions
diff --git a/community/redis/redis.d b/community/redis/redis.d
index 4babbaaa5..e1c79dd2b 100644
--- a/community/redis/redis.d
+++ b/community/redis/redis.d
@@ -48,6 +48,11 @@ case "$1" in
exit 1
else
PID=$(cat $PIDFILE)
+
+ # And grab the server address
+ REDISADDR=`egrep -o '^bind ([^#]+)' $CONF | cut -d' ' -f2`
+ [ -n "$REDISADDR" ] && CLIEXEC="$CLIEXEC -h $REDISADDR"
+
$CLIEXEC -p $REDISPORT shutdown
[ -d /proc/${PID} ] && sleep 1
[ -d /proc/${PID} ] && sleep 5