-
Notifications
You must be signed in to change notification settings - Fork 0
/
wait.sh
executable file
·24 lines (19 loc) · 1.58 KB
/
wait.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bash
clear
echo " ██████╗ █████╗ ████████╗ █████╗ ███████╗████████╗ █████╗ ██╗ ██╗ "
echo " ██╔══██╗██╔══██╗╚══██╔══╝██╔══██╗██╔════╝╚══██╔══╝██╔══██╗╚██╗██╔╝ "
echo " ██║ ██║███████║ ██║ ███████║███████╗ ██║ ███████║ ╚███╔╝ "
echo " ██║ ██║██╔══██║ ██║ ██╔══██║╚════██║ ██║ ██╔══██║ ██╔██╗ "
echo " ██████╔╝██║ ██║ ██║ ██║ ██║███████║ ██║ ██║ ██║██╔╝ ██╗ "
echo " ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ "
echo ""
#echo -n 'Preparing your environment ...';
#timeout 60 bash -c 'until cqlsh -e "describe cluster" >/dev/null 2>&1; do sleep 2; echo -n "."; done';
#echo ' done!'
#echo "Choose Astra DB or Cassandra on the left panel to start."
echo -n 'Starting a Cassandra cluster ...';
timeout 60 bash -c 'until /workspace/ds201-lab06/apache-cassandra-4.1.0/bin/cqlsh -e "describe cluster" >/dev/null 2>&1; do sleep 2; echo -n "."; done';
sleep 2
echo ' DONE!'
echo "Cassandra successfully started."
echo ""