Installation script enchansements(persistent SSH key)

master
Illia Chub 2020-09-14 12:04:42 +03:00
parent 89230b5f07
commit d31a88ebbb
1 changed files with 3 additions and 6 deletions

View File

@ -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