diff --git a/getssl b/getssl index 9bb39b3..5e52d83 100755 --- a/getssl +++ b/getssl @@ -141,6 +141,7 @@ _FORCE_RENEW=0 _QUIET=0 _UPGRADE=0 _UPGRADE_CHECK=1 +IPV6=false # store copy of original command in case of upgrading script and re-running ORIGCMD="$0 $*" @@ -1016,8 +1017,14 @@ for d in $alldomains; do # check nslookup for domains (ignore if using DNS check, as site may not be published yet) if [[ $VALIDATE_VIA_DNS != "true" ]]; then debug "checking nslookup for ${d}" - if [ "$(nslookup "${d}"| grep -c ^Name)" -lt 1 ]; then - error_exit "DNS lookup failed for $d" + if [[ "$IPV6" == "true" ]]; then + if [ "$(nslookup -query=AAAA "${d}"|grep -c ^""${d}".*has AAAA address")" -lt 1 ]; then + error_exit "DNS lookup IPV6 failed for $d" + fi + else + if [ "$(nslookup "${d}"| grep -c ^Name)" -lt 1 ]; then + error_exit "DNS lookup failed for $d" + fi fi fi done