diff --git a/getssl b/getssl index 4a9c3b6..2eb61ff 100755 --- a/getssl +++ b/getssl @@ -610,6 +610,16 @@ else fi debug "created SAN list = $SANLIST" +# check nslookup for domains +alldomains=$(echo "$DOMAIN,$SANS" | sed "s/,/ /g") +for d in $alldomains; do + debug "checking nslookup for ${d}" + exists=$(nslookup "${d}") + if [ "$?" != "0" ]; then + error_exit "DNS lookup failed for $d" + fi +done + # check if domain csr exists - if not then create it if [ -f "$DOMAIN_DIR/${DOMAIN}.csr" ]; then debug "domain csr exists at - $DOMAIN_DIR/${DOMAIN}.csr - skipping generation"