diff options
author | Remi Collet <fedora@famillecollet.com> | 2015-08-05 15:03:36 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2015-08-05 15:03:36 +0200 |
commit | 8cf42405c9b78fb72cc3c3d1238a729826d2f549 (patch) | |
tree | f1344f0ae80bf92fd3b3afcf3855098862876136 /redis-shutdown | |
parent | 65cfd5e22a22c8f4901b08be63c91516c4f8a314 (diff) |
make redis-shutdown more robust, fix #22
Diffstat (limited to 'redis-shutdown')
-rw-r--r-- | redis-shutdown | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/redis-shutdown b/redis-shutdown index e03d9a6..f0abf29 100644 --- a/redis-shutdown +++ b/redis-shutdown @@ -15,8 +15,8 @@ fi CONFIG_FILE="/etc/$SERVICE_NAME.conf" # 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` +HOST=`awk '/^[[:blank:]]*bind/ { print $2 }' $CONFIG_FILE | tail -n1` +PORT=`awk '/^[[:blank:]]*port/ { print $2 }' $CONFIG_FILE | tail -n1` # Just in case, use default host, port HOST=${HOST:-127.0.0.1} |