Browse Source

Add failsafe for nslookup

pull/32/head
Gonzalo Peci 10 years ago
parent
commit
60eec15aab
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      getssl

+ 6
- 3
getssl View File

@ -837,12 +837,15 @@ for d in $alldomains; do
# find a primary / authoratative DNS server for the domain
primary_ns=$(nslookup -type=soa "${d}" | grep origin | awk '{print $3}')
if [ -z $primary_ns ]; then
primary_ns=$(nslookup -type=soa "${d}" -debug=1 | grep origin | awk '{print $3}')
fi
debug primary_ns "$primary_ns"
# make a directory to hold pending dns-challenges
if [ ! -d "$TEMP_DIR/dns_verify" ]; then
mkdir "$TEMP_DIR/dns_verify"
fi
if [ ! -d "$TEMP_DIR/dns_verify" ]; then
mkdir "$TEMP_DIR/dns_verify"
fi
# generate a file with the current variables for the dns-challenge
cat > "$TEMP_DIR/dns_verify/$d" <<- _EOF_


Loading…
Cancel
Save