Browse Source

dont loop over domains for DNS_ADD_COMMAND check

pull/216/head
srvrco 9 years ago
parent
commit
b901b9d3ec
1 changed files with 13 additions and 11 deletions
  1. +13
    -11
      getssl

+ 13
- 11
getssl View File

@ -315,6 +315,17 @@ check_config() { # check the config files for all obvious errors
alldomains=$(echo "$DOMAIN,$SANS" | sed "s/,/ /g")
fi
if [[ $VALIDATE_VIA_DNS == "true" ]]; then # using dns-01 challenge
if [[ -z "$DNS_ADD_COMMAND" ]]; then
info "DNS_ADD_COMMAND not defined (whilst VALIDATE_VIA_DNS=true)"
config_errors=true
fi
if [[ -z "$DNS_DEL_COMMAND" ]]; then
info "DNS_DEL_COMMAND not defined (whilst VALIDATE_VIA_DNS=true)"
config_errors=true
fi
fi
dn=0
tmplist=$(mktemp)
for d in $alldomains; do # loop over domains (dn is domain number)
@ -331,16 +342,7 @@ check_config() { # check the config files for all obvious errors
DOMAIN_ACL="${ACL[$dn]}"
fi
if [[ $VALIDATE_VIA_DNS == "true" ]]; then # using dns-01 challenge
if [[ -z "$DNS_ADD_COMMAND" ]]; then
info "DNS_ADD_COMMAND not defined for $d"
config_errors=true
fi
if [[ -z "$DNS_DEL_COMMAND" ]]; then
info "DNS_DEL_COMMAND not defined for $d"
config_errors=true
fi
else # not using dns-01 challenge - using http-01 challenge
if [[ $VALIDATE_VIA_DNS != "true" ]]; then # using http-01 challenge
if [[ -z "${DOMAIN_ACL}" ]]; then
info "ACL location not specified for domain $d in $DOMAIN_DIR/getssl.cfg"
config_errors=true
@ -354,7 +356,7 @@ check_config() { # check the config files for all obvious errors
info "DNS lookup failed for $d"
config_errors=true
fi
fi # end of dns-01 http-01 check
fi # end http-01 check
((dn++))
done


Loading…
Cancel
Save