Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
38778f8a
Commit
38778f8a
authored
May 09, 2022
by
neil
Browse files
fix renew server
parent
8b7a86bd
Changes
1
Show whitespace changes
Inline
Side-by-side
acme.sh
View file @
38778f8a
...
...
@@ -20,8 +20,6 @@ _SUB_FOLDER_DEPLOY="deploy"
_SUB_FOLDERS="$_SUB_FOLDER_DNSAPI $_SUB_FOLDER_DEPLOY $_SUB_FOLDER_NOTIFY"
CA_LETSENCRYPT_V1="https://acme-v01.api.letsencrypt.org/directory"
CA_LETSENCRYPT_V2="https://acme-v02.api.letsencrypt.org/directory"
CA_LETSENCRYPT_V2_TEST="https://acme-staging-v02.api.letsencrypt.org/directory"
...
...
@@ -5257,6 +5255,7 @@ renew() {
_debug "_renewServer" "$_renewServer"
_initpath "$Le_Domain" "$_isEcc"
_set_level=${NOTIFY_LEVEL:-$NOTIFY_LEVEL_DEFAULT}
_info "$(__green "Renew: '$Le_Domain'")"
if [ ! -f "$DOMAIN_CONF" ]; then
...
...
@@ -5271,12 +5270,6 @@ renew() {
. "$DOMAIN_CONF"
_debug Le_API "$Le_API"
if [ "$_renewServer" ]; then
export ACME_DIRECTORY="$_renewServer"
else
export ACME_DIRECTORY="$Le_API"
fi
case "$Le_API" in
"$CA_LETSENCRYPT_V2_TEST")
_info "Switching back to $CA_LETSENCRYPT_V2"
...
...
@@ -5292,18 +5285,21 @@ renew() {
;;
esac
if [ "$Le_API" ] && [ "$ACME_DIRECTORY" ]; then
if [ "$Le_API" != "$ACME_DIRECTORY" ]; then
if [ "$_server" ]; then
Le_API="$_server"
fi
_info "Renew to Le_API=$Le_API"
export ACME_DIRECTORY="$Le_API"
_clearAPI
_clearCA
fi
#reload ca configs
ACCOUNT_KEY_PATH=""
ACCOUNT_JSON_PATH=""
CA_CONF=""
_debug2 "initpath again."
_initpath "$Le_Domain" "$_isEcc"
fi
if [ -z "$FORCE" ] && [ "$Le_NextRenewTime" ] && [ "$(_time)" -lt "$Le_NextRenewTime" ]; then
_info "Skip, Next renewal time is: $(__green "$Le_NextRenewTimeStr")"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment