]> git.proxmox.com Git - mirror_acme.sh.git/commitdiff
sleep to wait dns record to take effect.
authorneil <git@byneil.com>
Sat, 30 Jan 2016 14:47:22 +0000 (22:47 +0800)
committerneil <git@byneil.com>
Sat, 30 Jan 2016 14:47:22 +0000 (22:47 +0800)
dnsapi/dns-cf.sh
le.sh

index ac3643c4d81945066dee7e4ab5feb0638a0366ee..888e9b3f78e23a77659467c385f651c99087d904 100755 (executable)
@@ -37,7 +37,8 @@ dns-cf-add() {
     if _cf_rest POST "/zones/$_domain_id/dns_records"  "{\"type\":\"TXT\",\"name\":\"$fulldomain\",\"content\":\"$txtvalue\",\"ttl\":120}"; then
       if printf $response | grep $fulldomain > /dev/null ; then
         _info "Added, sleeping 10 seconds"
-        sleep 1
+        sleep 10
+        #todo: check if the record takes effect
         return 0
       else
         _err "Add txt record error."
@@ -54,6 +55,7 @@ dns-cf-add() {
     if [ "$?" == "0" ]; then
       _info "Updated, sleeping 10 seconds"
       sleep 10
+      #todo: check if the record takes effect
       return 0;
     fi
     _err "Update error"
diff --git a/le.sh b/le.sh
index c44378226e4c7db7f07def4c431c0f98be6e800b..a61224183d923d006b7a8e029678a1d01a116034 100755 (executable)
--- a/le.sh
+++ b/le.sh
@@ -673,6 +673,10 @@ issue() {
     
   fi
   
+  if [ "$dnsadded" == '1' ] ; then
+    _info "Sleep 60 seconds for the txt records to take effect"
+    sleep 60
+  fi
   
   _debug "ok, let's start to verify"
   ventries=$(echo "$vlist" | sed "s/,/ /g")