|
|
|
@ -47,13 +47,15 @@ |
|
|
|
# 2016-04-15 Remove NS Lookup of A record when using dns validation (0.29) - pecigonzalo |
|
|
|
# 2016-04-17 Improving the wording in a couple of comments and info statements. (0.30) |
|
|
|
# 2016-05-04 Improve check for if DNS_DEL_COMMAND is blank. (0.31) |
|
|
|
# 2016-05-06 Setting umask to 077 for security of private keys etc. (0.32) |
|
|
|
# 2016-05-10 update to reflect changes in staging ACME server json (0.33) |
|
|
|
# 2016-05-10 tidying up checking of json following AMCE changes. (0.34) |
|
|
|
# 2016-05-06 Setting umask to 077 for security of private keys etc. (0.32) |
|
|
|
# 2016-05-20 update to reflect changes in staging ACME server json (0.33) |
|
|
|
# 2016-05-20 tidying up checking of json following AMCE changes. (0.34) |
|
|
|
# 2016-05-21 added AUTH_DNS_SERVER to getssl.cfg as optional definition of authoritative DNS server (0.35) |
|
|
|
# --------------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
|
|
|
PROGNAME=${0##*/} |
|
|
|
VERSION="0.34" |
|
|
|
VERSION="0.35" |
|
|
|
|
|
|
|
# defaults |
|
|
|
CA="https://acme-staging.api.letsencrypt.org" |
|
|
|
@ -856,10 +858,14 @@ for d in $alldomains; do |
|
|
|
debug "adding dns via command: $DNS_ADD_COMMAND $d $auth_key" |
|
|
|
$DNS_ADD_COMMAND "$d" "$auth_key" |
|
|
|
|
|
|
|
# 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}') |
|
|
|
# find a primary / authoritative DNS server for the domain |
|
|
|
if [ -z "$AUTH_DNS_SERVER" ]; then |
|
|
|
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 |
|
|
|
else |
|
|
|
primary_ns="$AUTH_DNS_SERVER" |
|
|
|
fi |
|
|
|
debug primary_ns "$primary_ns" |
|
|
|
|
|
|
|
|