diff options
author | Remi Collet <remi@remirepo.net> | 2023-04-18 08:03:34 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2023-04-18 08:03:34 +0200 |
commit | 8ad012599b1779131ca6b6f03b5208388a320766 (patch) | |
tree | c71e866140b033b5647cdbf4c2784b74f581b136 /redis-shutdown | |
parent | fa553564a84603ba9fbc2d272e1e83aebd886db7 (diff) |
Redis 7.0.11 Released Mon Apr 17 16:00:00 IST 2023
Upgrade urgency: SECURITY, contains fixes to security issues.
fix modules directory ownership and permissions #2176173
drop redis-shutdown helper and rely on systemd #2181181
Diffstat (limited to 'redis-shutdown')
-rw-r--r-- | redis-shutdown | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/redis-shutdown b/redis-shutdown deleted file mode 100644 index 1a4335a..0000000 --- a/redis-shutdown +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash -# -# Wrapper to close properly redis and sentinel -test x"$REDIS_DEBUG" != x && set -x - -REDIS_CLI=/usr/bin/redis-cli - -# Retrieve service name -SERVICE_NAME="$1" -if [ -z "$SERVICE_NAME" ]; then - SERVICE_NAME=redis -fi - -# Get the proper config file based on service name -CONFIG_FILE="/etc/redis/$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` -SOCK=`awk '/^[[:blank:]]*unixsocket\s/ { print $2 }' $CONFIG_FILE | tail -n1` - -# Just in case, use default host, port -HOST=${HOST:-127.0.0.1} -if [ "$SERVICE_NAME" = redis ]; then - PORT=${PORT:-6379} -else - PORT=${PORT:-26739} -fi - -# Setup additional parameters -# e.g password-protected redis instances -[ -z "$PASS" ] || ADDITIONAL_PARAMS="-a $PASS" - -# shutdown the service properly -if [ -e "$SOCK" ] ; then - $REDIS_CLI -s $SOCK $ADDITIONAL_PARAMS shutdown -else - $REDIS_CLI -h $HOST -p $PORT $ADDITIONAL_PARAMS shutdown -fi |