Merge "letsencrypt: make acme.sh exits clearer"
This commit is contained in:
commit
9021c6224e
@ -59,7 +59,13 @@ if [[ ${1} == "issue" ]]; then
|
||||
echo "Valid and current certificate found" >> ${LOG_FILE}
|
||||
exit 0
|
||||
elif [[ ${_exit_code} == 3 ]]; then
|
||||
# acme.sh really wants to talk to your SAAS DNS API for
|
||||
# you to setup the challenge-reponse and then issue the
|
||||
# cert; the "dns manual mode" requires the odd flags and
|
||||
# also returns a separate error code when issuing a cert.
|
||||
# For our purposes, this is a success.
|
||||
echo "Certificate request issued" >> ${LOG_FILE}
|
||||
exit 0
|
||||
else
|
||||
echo "Unknown failure: ${_exit_code}" >> ${LOG_FILE}
|
||||
exit ${_exit_code}
|
||||
@ -112,6 +118,7 @@ elif [[ ${1} == "renew" ]]; then
|
||||
exit 0
|
||||
elif [[ ${_exit_code} == 0 ]]; then
|
||||
echo "Certificate renewed" >> ${LOG_FILE}
|
||||
exit 0
|
||||
else
|
||||
echo "Unknown failure: ${_exit_code}" >> ${LOG_FILE}
|
||||
exit ${_exit_code}
|
||||
@ -119,6 +126,9 @@ elif [[ ${1} == "renew" ]]; then
|
||||
done
|
||||
elif [[ ${1} == "selfsign" ]]; then
|
||||
# For testing, simulate the key generation
|
||||
# Note as above "arg" is a compound argument where each
|
||||
# request is a space-separated separate string, e.g.
|
||||
# "-d foo.com -d foo1.com" "-d bar.com -d bar1.com"
|
||||
shift;
|
||||
for arg in "$@"; do
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user