blob: 2f97d0768e5804f33611d706b1a3ead7aaa67872 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/bin/bash
CASSANDRA_PASS=<%= @cassandra_pwd %>
CASSANDRA_IP=<%= @cassandra_ip %>
if [[ $(nodetool status |tail -n2 | grep -Ev "^$"a) == *"UN"* ]]; then
echo "exit" | cqlsh -u cassandra -p $CASSANDRA_PASS $CASSANDRA_IP > /dev/null 2>&1
rc=$?
if [[ $rc != 0 ]]; then exit $rc; fi
fi
exit 0;
else
echo "Not Up";
exit 1;
fi
|