-
Notifications
You must be signed in to change notification settings - Fork 0
/
wait.sh
executable file
·18 lines (16 loc) · 1.52 KB
/
wait.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env bash
clear
echo " ██████╗ █████╗ ████████╗ █████╗ ███████╗████████╗ █████╗ ██╗ ██╗ "
echo " ██╔══██╗██╔══██╗╚══██╔══╝██╔══██╗██╔════╝╚══██╔══╝██╔══██╗╚██╗██╔╝ "
echo " ██║ ██║███████║ ██║ ███████║███████╗ ██║ ███████║ ╚███╔╝ "
echo " ██║ ██║██╔══██║ ██║ ██╔══██║╚════██║ ██║ ██╔══██║ ██╔██╗ "
echo " ██████╔╝██║ ██║ ██║ ██║ ██║███████║ ██║ ██║ ██║██╔╝ ██╗ "
echo " ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ "
echo ""
echo -n 'Preparing your environment ...';
timeout 120 bash -c 'until ./node1/bin/cqlsh -e "describe cluster" >/dev/null 2>&1; do sleep 2; echo -n "."; done';
timeout 120 bash -c 'until ./node2/bin/cqlsh -e "describe cluster" >/dev/null 2>&1; do sleep 2; echo -n "."; done';
timeout 120 bash -c 'until ./node3/bin/cqlsh -e "describe cluster" >/dev/null 2>&1; do sleep 2; echo -n "."; done';
echo ' DONE!'
echo "Environment ready."
echo ""