diff options
author | Remi Collet <fedora@famillecollet.com> | 2016-02-08 12:51:06 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2016-02-08 12:51:06 +0100 |
commit | 059e1dfff0c0dac62e8aab408bb684f33d7da3a3 (patch) | |
tree | 2b74fd47999b2066f897e9e8960a912a49c86836 | |
parent | 9a91525197678fcc5e52cc601daee478d1a50372 (diff) |
redis: Fix redis-shutdown to handle password-protected instances shutdown, fix #31
-rw-r--r-- | redis-dev.spec | 5 | ||||
-rw-r--r-- | redis-shutdown | 7 | ||||
-rw-r--r-- | redis.spec | 5 |
3 files changed, 14 insertions, 3 deletions
diff --git a/redis-dev.spec b/redis-dev.spec index 7f7a425..75884e5 100644 --- a/redis-dev.spec +++ b/redis-dev.spec @@ -28,7 +28,7 @@ Name: redis Version: 3.2 -Release: 0.3.%{prever}%{?dist} +Release: 0.4.%{prever}%{?dist} Summary: A persistent key-value database Group: Applications/Databases @@ -245,6 +245,9 @@ fi %changelog +* Mon Feb 8 2016 Haïkel Guémar <hguemar@fedoraproject.org> - 3.2-0.4.rc3 +- Fix redis-shutdown to handle password-protected instances shutdown + * Thu Jan 28 2016 Remi Collet <remi@fedoraproject.org> - 3.2-0.3.rc3 - update to 3.2-rc3 (version 3.1.103) diff --git a/redis-shutdown b/redis-shutdown index f0abf29..57f21af 100644 --- a/redis-shutdown +++ b/redis-shutdown @@ -17,6 +17,7 @@ CONFIG_FILE="/etc/$SERVICE_NAME.conf" # Use awk to retrieve host, port from config file HOST=`awk '/^[[:blank:]]*bind/ { print $2 }' $CONFIG_FILE | tail -n1` PORT=`awk '/^[[:blank:]]*port/ { print $2 }' $CONFIG_FILE | tail -n1` +PASS=`awk '/^[[:blank:]]*requirepass/ { print $2 }' $CONFIG_FILE | tail -n1` # Just in case, use default host, port HOST=${HOST:-127.0.0.1} @@ -26,5 +27,9 @@ else PORT=${PORT:-26739} fi +# Setup additional parameters +# e.g password-protected redis instances +[ -z "$PASS" ] || ADDITIONAL_PARAMS="-a $PASS" + # shutdown the service properly -$REDIS_CLI -h $HOST -p $PORT shutdown +$REDIS_CLI -h $HOST -p $PORT $ADDITIONAL_PARAMS shutdown @@ -21,7 +21,7 @@ Name: redis Version: 3.0.7 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A persistent key-value database Group: Applications/Databases @@ -229,6 +229,9 @@ fi %changelog +* Mon Feb 8 2016 Haïkel Guémar <hguemar@fedoraproject.org> - 3.0.7-2 +- Fix redis-shutdown to handle password-protected instances shutdown + * Tue Jan 26 2016 Remi Collet <remi@fedoraproject.org> - 3.0.7-1 - Redis 3.0.7 - Release date: 25 jan 2016 - Upgrade urgency: MODERATE |