Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
14b59142
Commit
14b59142
authored
Apr 28, 2022
by
neilpang
Browse files
fix renew bug
parent
a0eabd22
Changes
1
Show whitespace changes
Inline
Side-by-side
acme.sh
View file @
14b59142
...
@@ -4975,7 +4975,7 @@ $_authorizations_map"
...
@@ -4975,7 +4975,7 @@ $_authorizations_map"
return
1
return
1
fi
fi
_debug
"sleep 2 secs to verify again"
_debug
"sleep 2 secs to verify again"
sleep
2
_
sleep 2
_debug
"checking"
_debug
"checking"
_send_signed_request
"
$uri
"
_send_signed_request
"
$uri
"
...
@@ -5250,7 +5250,8 @@ renew() {
...
@@ -5250,7 +5250,8 @@ renew() {
fi
fi
_isEcc
=
"
$2
"
_isEcc
=
"
$2
"
#the server specified from commandline
_acme_server_back
=
"
$ACME_DIRECTORY
"
_initpath
"
$Le_Domain
"
"
$_isEcc
"
_initpath
"
$Le_Domain
"
"
$_isEcc
"
_set_level
=
${
NOTIFY_LEVEL
:-
$NOTIFY_LEVEL_DEFAULT
}
_set_level
=
${
NOTIFY_LEVEL
:-
$NOTIFY_LEVEL_DEFAULT
}
_info
"
$(
__green
"Renew: '
$Le_Domain
'"
)
"
_info
"
$(
__green
"Renew: '
$Le_Domain
'"
)
"
...
@@ -5271,10 +5272,13 @@ renew() {
...
@@ -5271,10 +5272,13 @@ renew() {
Le_API
=
"
$CA_LETSENCRYPT_V2
"
Le_API
=
"
$CA_LETSENCRYPT_V2
"
fi
fi
#revert from staging CAs back to production CAs
if
[
"
$_acme_server_back
"
]
;
then
if
[
-z
"
$ACME_DIRECTORY
"
]
;
then
export
ACME_DIRECTORY
=
"
$_acme_server_back
"
case
"
$Le_API
"
in
else
export
ACME_DIRECTORY
=
"
$Le_API
"
fi
case
"
$Le_API
"
in
"
$CA_LETSENCRYPT_V2_TEST
"
)
"
$CA_LETSENCRYPT_V2_TEST
"
)
_info
"Switching back to
$CA_LETSENCRYPT_V2
"
_info
"Switching back to
$CA_LETSENCRYPT_V2
"
Le_API
=
"
$CA_LETSENCRYPT_V2
"
Le_API
=
"
$CA_LETSENCRYPT_V2
"
...
@@ -5288,7 +5292,7 @@ renew() {
...
@@ -5288,7 +5292,7 @@ renew() {
Le_API
=
"
$CA_GOOGLE
"
Le_API
=
"
$CA_GOOGLE
"
;;
;;
esac
esac
fi
if
[
"
$Le_API
"
]
&&
[
"
$ACME_DIRECTORY
"
]
;
then
if
[
"
$Le_API
"
]
&&
[
"
$ACME_DIRECTORY
"
]
;
then
if
[
"
$Le_API
"
!=
"
$ACME_DIRECTORY
"
]
;
then
if
[
"
$Le_API
"
!=
"
$ACME_DIRECTORY
"
]
;
then
...
@@ -5298,7 +5302,7 @@ renew() {
...
@@ -5298,7 +5302,7 @@ renew() {
ACCOUNT_KEY_PATH
=
""
ACCOUNT_KEY_PATH
=
""
ACCOUNT_JSON_PATH
=
""
ACCOUNT_JSON_PATH
=
""
CA_CONF
=
""
CA_CONF
=
""
_debug
3
"initpath again."
_debug
2
"initpath again."
_initpath
"
$Le_Domain
"
"
$_isEcc
"
_initpath
"
$Le_Domain
"
"
$_isEcc
"
fi
fi
...
@@ -6959,6 +6963,10 @@ _processAccountConf() {
...
@@ -6959,6 +6963,10 @@ _processAccountConf() {
}
}
_checkSudo
()
{
_checkSudo
()
{
if
[
-z
"__INTERACTIVE"
]
;
then
#don't check if it's not in an interactive shell
return
0
fi
if
[
"
$SUDO_GID
"
]
&&
[
"
$SUDO_COMMAND
"
]
&&
[
"
$SUDO_USER
"
]
&&
[
"
$SUDO_UID
"
]
;
then
if
[
"
$SUDO_GID
"
]
&&
[
"
$SUDO_COMMAND
"
]
&&
[
"
$SUDO_USER
"
]
&&
[
"
$SUDO_UID
"
]
;
then
if
[
"
$SUDO_USER
"
=
"root"
]
&&
[
"
$SUDO_UID
"
=
"0"
]
;
then
if
[
"
$SUDO_USER
"
=
"root"
]
&&
[
"
$SUDO_UID
"
=
"0"
]
;
then
#it's root using sudo, no matter it's using sudo or not, just fine
#it's root using sudo, no matter it's using sudo or not, just fine
...
...
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