Commit be7840c8 authored by Ian Wienand's avatar Ian Wienand
Browse files

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.
parent 7746042a
...@@ -4764,7 +4764,13 @@ $_authorizations_map" ...@@ -4764,7 +4764,13 @@ $_authorizations_map"
_err "Please add the TXT records to the domains, and re-run with --renew." _err "Please add the TXT records to the domains, and re-run with --renew."
_on_issue_err "$_post_hook" _on_issue_err "$_post_hook"
_clearup _clearup
return 1 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
fi fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment