Created
February 5, 2019 11:13
-
-
Save habil/f9f9bf39c79d702e89ee8d980070e93b to your computer and use it in GitHub Desktop.
Create Redis Slot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ip=$1 | |
counter=$2 | |
end=-1 | |
if [ -z ${3+x} ]; | |
then | |
end=16383 | |
echo "max slot not specified. auto set to 16383"; | |
else | |
end=$3 | |
fi | |
while [ $counter -le $end ] | |
do | |
redis-cli CLUSTER ADDSLOTS $counter > /dev/null | |
echo $ip $counter / $end | |
((counter++)) | |
done | |
echo All done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment