File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ unset API_KEY
42
42
unset USERNAME
43
43
unset NO_OF_WORKERS
44
44
unset REBOOT_STRATEGY
45
+ unset WORKER_IDS
45
46
46
47
stty -echo
47
48
tput civis
113
114
114
115
if [ " $1 " == " destroy" ]; then
115
116
spinner " Retrieving master linode (if any)" get_master_id MASTER_ID
116
- if [ -z " $MASTER_ID " ] ; then
117
+ if ! [[ $MASTER_ID =~ ^[0-9]+$ ]] 2> /dev/null ; then
117
118
tput el
118
119
echo " ${red} No master node found! Cluster is likely to have been deleted.${normal} "
119
120
else
@@ -160,7 +161,7 @@ if [ "$1" == "destroy" ]; then
160
161
elif [ " $1 " == " create" ]; then
161
162
spinner " Retrieving master linode (if any)" get_master_id MASTER_ID
162
163
163
- if ! [[ $MASTER_ID =~ ^- ? [0-9]+$ ]] 2> /dev/null; then
164
+ if ! [[ $MASTER_ID =~ ^[0-9]+$ ]] 2> /dev/null; then
164
165
spinner " Retrieving list of workers" list_worker_ids WORKER_IDS
165
166
for WORKER_ID in $WORKER_IDS ; do
166
167
spinner " ${CYAN} [$WORKER_ID ]${NORMAL} Deleting worker (since certs are now invalid)" \
You can’t perform that action at this time.
0 commit comments