hguemar pushed to redis (epel7). "Fix redis-shutdown on multiple NIC setup (RHBZ #1201237)"
notifications at fedoraproject.org
notifications at fedoraproject.org
Tue Mar 31 15:12:57 UTC 2015
>From 6562d33167817a34ea124c7d5ecf81717707e09f Mon Sep 17 00:00:00 2001
From: Haikel Guemar <hguemar at fedoraproject.org>
Date: Thu, 26 Mar 2015 23:59:51 +0100
Subject: Fix redis-shutdown on multiple NIC setup (RHBZ #1201237)
diff --git a/redis-shutdown b/redis-shutdown
index 1b0622f..e03d9a6 100644
--- a/redis-shutdown
+++ b/redis-shutdown
@@ -14,10 +14,12 @@ fi
# Get the proper config file based on service name
CONFIG_FILE="/etc/$SERVICE_NAME.conf"
-# Use awk to retrieve port from config file
+# Use awk to retrieve host, port from config file
+HOST=`awk '/^[[:blank:]]*bind/ { print $2 }' $CONFIG_FILE`
PORT=`awk '/^[[:blank:]]*port/ { print $2 }' $CONFIG_FILE`
-# Just in case, use default port
+# Just in case, use default host, port
+HOST=${HOST:-127.0.0.1}
if [ "$SERVICE_NAME" = redis ]; then
PORT=${PORT:-6379}
else
@@ -25,4 +27,4 @@ else
fi
# shutdown the service properly
-$REDIS_CLI -p $PORT shutdown
\ No newline at end of file
+$REDIS_CLI -h $HOST -p $PORT shutdown
diff --git a/redis.spec b/redis.spec
index fce5491..0202c06 100644
--- a/redis.spec
+++ b/redis.spec
@@ -12,7 +12,7 @@
Name: redis
Version: 2.8.19
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A persistent key-value database
License: BSD
URL: http://redis.io
@@ -241,6 +241,9 @@ fi
%endif
%changelog
+* Thu Mar 26 2015 Haïkel Guémar <hguemar at fedoraproject.org> - 2.8.19-2
+- Fix redis-shutdown on multiple NIC setup (RHBZ #1201237)
+
* Thu Feb 26 2015 Haïkel Guémar <hguemar at fedoraproject.org> - 2.8.19-1
- Upstream 2.8.19 (RHBZ #1175232)
- Fix permissions (RHBZ #1182913)
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/redis.git/commit/?h=epel7&id=6562d33167817a34ea124c7d5ecf81717707e09f
More information about the scm-commits
mailing list