Browse Source

Exit with separate failure if in DNS manual mode

In our environment we use DNS manual mode and take the TXT record
output of acme.sh and process it with Ansible to install the records
(then we call renew later when the records have been pushed to the DNS
servers by a whole bunch of other bits).

One problem is that after getting/showing the TXT records, acme.sh
always returns 1.  This makes it difficult to tell if there is
actually an error condition.

Since we have set the manual-mode flag, not installing the DNS records
is an expected correct result.  This returns a separate error code for
this situation (3), which can be distinguished in automation.
pull/2606/head
Ian Wienand 5 years ago
parent
commit
be7840c827
  1. 6
      acme.sh

6
acme.sh

@ -4764,8 +4764,14 @@ $_authorizations_map"
_err "Please add the TXT records to the domains, and re-run with --renew."
_on_issue_err "$_post_hook"
_clearup
if [ -n "$FORCE_DNS_MANUAL" ]; then
# If asked to be in manual DNS mode, flag this exit with a separate
# error so it can be distinguished from other failures.
return 3
else
return 1
fi
fi
fi

Loading…
Cancel
Save