Check for DNS records to apply, if not then sleep

This commit is contained in:
Mike Raunsbæk 2019-01-20 00:27:39 +01:00
parent 27579e0701
commit e13a8481fe

11
acme.sh
View File

@ -3882,6 +3882,17 @@ $_authorizations_map"
_info "Sleep $(__green $Le_DNSSleep) seconds for the txt records to take effect" _info "Sleep $(__green $Le_DNSSleep) seconds for the txt records to take effect"
_sleep "$Le_DNSSleep" _sleep "$Le_DNSSleep"
while true; do
doesTxtExist=$(dig @$(dig @8.8.8.8 $_main_domain ns +short | head -n1) TXT $txtdomain | grep "$txt")
if [ -z "$doesTxtExist" ]; then
_info "DNS TXT record has not been applied yet, sleep $(__green 3) seconds for the txt records to take effect"
_sleep "3"
else
_info "DNS records has been applied"
break
fi
done
fi fi
NGINX_RESTORE_VLIST="" NGINX_RESTORE_VLIST=""