From d31a88ebbbcf3a4de363816912f040f649981cd2 Mon Sep 17 00:00:00 2001 From: Illia Chub Date: Mon, 14 Sep 2020 12:04:42 +0300 Subject: [PATCH] Installation script enchansements(persistent SSH key) --- static/server.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/static/server.sh b/static/server.sh index 3bacf77..101bf01 100644 --- a/static/server.sh +++ b/static/server.sh @@ -207,12 +207,9 @@ done < .records for recordid in "${recordIDs[@]}" do - echo $zoneid - echo $recordid - echo $CLOUDFLARE_TOKEN - curl -X DELETE "https://api.cloudflare.com/client/v4/zones/$zoneid/dns_records/$recordid" \ + curl -s -X DELETE "https://api.cloudflare.com/client/v4/zones/$zoneid/dns_records/$recordid" \ -H "Authorization: Bearer $CLOUDFLARE_TOKEN" \ - -H "Content-Type: application/json" + -H "Content-Type: application/json" > /dev/null done } @@ -220,7 +217,7 @@ done WaitDNSPropagation() { printf "Waiting for DNS Record to propagate..." - while [[ $( dig A +short ilchub.net ) != $machineip ]] + while [[ $( ping -n 1 $DOMAIN | grep -o $machineip ) != $machineip ]] do sleep 1 done