summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorFrank Meier <40453138+meierfra-ergon@users.noreply.github.com>2020-08-05 11:06:33 +0200
committerGitHub <noreply@github.com>2020-08-05 12:06:33 +0300
commit3244fae7d4f2e77f6d0d3f8280e852bd63753462 (patch)
tree2f3fe3052756e4ebc272da5b3db3a9850783321d /utils
parent40c7628fc815d24b43494bbf4ff59450926190bb (diff)
downloadredis-3244fae7d4f2e77f6d0d3f8280e852bd63753462.tar.gz
add force option to 'create-cluster create' script call (#7612)
Diffstat (limited to 'utils')
-rwxr-xr-xutils/create-cluster/create-cluster8
1 files changed, 6 insertions, 2 deletions
diff --git a/utils/create-cluster/create-cluster b/utils/create-cluster/create-cluster
index 931f6f521..d9a3b8c35 100755
--- a/utils/create-cluster/create-cluster
+++ b/utils/create-cluster/create-cluster
@@ -38,7 +38,11 @@ then
PORT=$((PORT+1))
HOSTS="$HOSTS $CLUSTER_HOST:$PORT"
done
- $BIN_PATH/redis-cli --cluster create $HOSTS --cluster-replicas $REPLICAS
+ OPT_ARG=""
+ if [ "$2" == "-f" ]; then
+ OPT_ARG="--cluster-yes"
+ fi
+ $BIN_PATH/redis-cli --cluster create $HOSTS --cluster-replicas $REPLICAS $OPT_ARG
exit 0
fi
@@ -104,7 +108,7 @@ fi
echo "Usage: $0 [start|create|stop|watch|tail|clean|call]"
echo "start -- Launch Redis Cluster instances."
-echo "create -- Create a cluster using redis-cli --cluster create."
+echo "create [-f] -- Create a cluster using redis-cli --cluster create."
echo "stop -- Stop Redis Cluster instances."
echo "watch -- Show CLUSTER NODES output (first 30 lines) of first node."
echo "tail <id> -- Run tail -f of instance at base port + ID."