]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
redis: No need to mangle this for other platforms
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 13 Apr 2023 06:49:31 +0000 (16:49 +1000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 13 Apr 2023 08:29:39 +0000 (18:29 +1000)
scripts/ci/redis-setup.sh

index 7e16d633231329194cb4859036f9f894106c0596..d33991ff089c09a3158db56c6900e5437c563a65 100755 (executable)
@@ -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