From: Arran Cudbard-Bell Date: Thu, 13 Apr 2023 06:49:31 +0000 (+1000) Subject: redis: No need to mangle this for other platforms X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28bde2817eed087e91654d3584c1a053fb8b3736;p=thirdparty%2Ffreeradius-server.git redis: No need to mangle this for other platforms --- diff --git a/scripts/ci/redis-setup.sh b/scripts/ci/redis-setup.sh index 7e16d63323..d33991ff08 100755 --- a/scripts/ci/redis-setup.sh +++ b/scripts/ci/redis-setup.sh @@ -31,10 +31,12 @@ fi sed -ie "s#\$BIN_PATH/redis-cli#echo 'yes' | redis-cli#" "${TMP_REDIS_DIR}/create-cluster" sed -ie "s#\$BIN_PATH/redis-server#redis-server#" "${TMP_REDIS_DIR}/create-cluster" -# Remove option not applicable to redis version on Ubuntu 20.04 -sed -ie "s# --appenddirname appendonlydir-\${PORT}##" "${TMP_REDIS_DIR}/create-cluster" -# Fix cleanup to match option change above -sed -ie "s#appendonlydir-\*#appendonly\*.aof#" "${TMP_REDIS_DIR}/create-cluster" +if which lsb_release > /dev/null && lsb_release -ds | grep 'Ubuntu 20.04'; then + # Remove option not applicable to redis version on Ubuntu 20.04 + sed -ie "s# --appenddirname appendonlydir-\${PORT}##" "${TMP_REDIS_DIR}/create-cluster" + # Fix cleanup to match option change above + sed -ie "s#appendonlydir-\*#appendonly\*.aof#" "${TMP_REDIS_DIR}/create-cluster" +fi # Ensure all nodes are accessible before creating cluster if [ "$1" == "create" ]; then