Browse Source

if using dig we need to check for either an SOA or A type record.

Signed-off-by: Scott Gustafson <scott@garlicsoftware.com>
pull/519/head
Scott Gustafson 9 years ago
parent
commit
69ef4ff80e
No known key found for this signature in database GPG Key ID: B3594547497EFC6D
1 changed files with 10 additions and 1 deletions
  1. +10
    -1
      getssl

+ 10
- 1
getssl View File

@ -389,13 +389,22 @@ check_config() { # check the config files for all obvious errors
config_errors=true
fi
# check domain exist
if [[ "$DNS_CHECK_FUNC" == "drill" ]] || [[ "$DNS_CHECK_FUNC" == "dig" ]]; then
if [[ "$DNS_CHECK_FUNC" == "drill" ]]; then
if [[ "$($DNS_CHECK_FUNC "${d}" SOA|grep -c "^${d}")" -ge 1 ]]; then
debug "found IP for ${d}"
else
info "${DOMAIN}: DNS lookup failed for ${d}"
config_errors=true
fi
elif [[ "$DNS_CHECK_FUNC" == "dig" ]]; then
if [[ "$($DNS_CHECK_FUNC "${d}" -t SOA|grep -c "^${d}")" -ge 1 ]]; then
debug "found SOA IP for ${d}"
elif [[ "$($DNS_CHECK_FUNC "${d}" -t A|grep -c "^${d}")" -ge 1 ]]; then
debug "found A IP for ${d}"
else
info "${DOMAIN}: DNS lookup failed for ${d}"
config_errors=true
fi
elif [[ "$DNS_CHECK_FUNC" == "host" ]]; then
if [[ "$($DNS_CHECK_FUNC "${d}" |grep -c "^${d}")" -ge 1 ]]; then
debug "found IP for ${d}"


Loading…
Cancel
Save