fix deactivate

pull/3574/head
neilpang 3 years ago
parent 536a5f7cff
commit 1752004301

@ -2535,6 +2535,16 @@ __initHome() {
fi fi
} }
_clearAPI() {
ACME_NEW_ACCOUNT=""
ACME_KEY_CHANGE=""
ACME_NEW_AUTHZ=""
ACME_NEW_ORDER=""
ACME_REVOKE_CERT=""
ACME_NEW_NONCE=""
ACME_AGREEMENT=""
}
#server #server
_initAPI() { _initAPI() {
_api_server="${1:-$ACME_DIRECTORY}" _api_server="${1:-$ACME_DIRECTORY}"
@ -5032,6 +5042,9 @@ renew() {
_debug Le_API "$Le_API" _debug Le_API "$Le_API"
if [ "$Le_API" ]; then if [ "$Le_API" ]; then
if [ "$Le_API" != "$ACME_DIRECTORY" ]; then
_clearAPI
fi
export ACME_DIRECTORY="$Le_API" export ACME_DIRECTORY="$Le_API"
#reload ca configs #reload ca configs
ACCOUNT_KEY_PATH="" ACCOUNT_KEY_PATH=""
@ -5039,6 +5052,7 @@ renew() {
CA_CONF="" CA_CONF=""
_debug3 "initpath again." _debug3 "initpath again."
_initpath "$Le_Domain" "$_isEcc" _initpath "$Le_Domain" "$_isEcc"
_initAPI
fi fi
if [ -z "$FORCE" ] && [ "$Le_NextRenewTime" ] && [ "$(_time)" -lt "$Le_NextRenewTime" ]; then if [ -z "$FORCE" ] && [ "$Le_NextRenewTime" ] && [ "$(_time)" -lt "$Le_NextRenewTime" ]; then
@ -5781,6 +5795,9 @@ _deactivate() {
_debug Le_API "$Le_API" _debug Le_API "$Le_API"
if [ "$Le_API" ]; then if [ "$Le_API" ]; then
if [ "$Le_API" != "$ACME_DIRECTORY" ]; then
_clearAPI
fi
export ACME_DIRECTORY="$Le_API" export ACME_DIRECTORY="$Le_API"
#reload ca configs #reload ca configs
ACCOUNT_KEY_PATH="" ACCOUNT_KEY_PATH=""
@ -5788,6 +5805,7 @@ _deactivate() {
CA_CONF="" CA_CONF=""
_debug3 "initpath again." _debug3 "initpath again."
_initpath "$Le_Domain" "$_d_type" _initpath "$Le_Domain" "$_d_type"
_initAPI
fi fi
_identifiers="{\"type\":\"dns\",\"value\":\"$_d_domain\"}" _identifiers="{\"type\":\"dns\",\"value\":\"$_d_domain\"}"

Loading…
Cancel
Save