3 CASSANDRA_PASS=<%= @cassandra_pwd %>
4 CASSANDRA_IP=<%= @cassandra_ip %>
5 CASSANDRA_PORT=<%= @cassandra_port %>
7 if [[ $(nodetool status |tail -n2 | grep -Ev "^$"a) == *"UN"* ]]; then
8 echo "exit" | cqlsh -u cassandra -p $CASSANDRA_PASS $CASSANDRA_IP $CASSANDRA_PORT > /dev/null 2>&1
10 if [[ $rc != 0 ]]; then exit $rc; fi