Created
December 11, 2015 01:35
-
-
Save kimh/e7211dde406794998278 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
echo "describe cluster;" > /tmp/dc | |
for i in {1..5}; do | |
echo Attempt $i | |
if cassandra-cli -f /tmp/dc 2>&1 | grep "Cluster Information"; then | |
exit 0 | |
else | |
sudo service cassandra stop; sudo service cassandra start | |
sleep 10 | |
fi | |
done | |
exit 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment