mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-11-20 13:21:44 +00:00
Merge branch 'dev' of https://github.com/kappernet/acme.sh into dev
This commit is contained in:
commit
a494683bc8
8
acme.sh
8
acme.sh
@ -5642,7 +5642,7 @@ _deactivate() {
|
||||
_URL_NAME="uri"
|
||||
fi
|
||||
|
||||
entries="$(echo "$response" | _egrep_o "{ *\"type\":\"[^\"]*\", *\"status\": *\"valid\", *\"$_URL_NAME\"[^}]*")"
|
||||
entries="$(echo "$response" | _egrep_o "[^{]*\"type\":\"[^\"]*\", *\"status\": *\"valid\", *\"$_URL_NAME\"[^}]*")"
|
||||
if [ -z "$entries" ]; then
|
||||
_info "No valid entries found."
|
||||
if [ -z "$thumbprint" ]; then
|
||||
@ -6448,10 +6448,10 @@ _checkSudo() {
|
||||
#it's root using sudo, no matter it's using sudo or not, just fine
|
||||
return 0
|
||||
fi
|
||||
if [ "$SUDO_COMMAND" = "/bin/su" ] || [ "$SUDO_COMMAND" = "/bin/bash" ]; then
|
||||
if [ -n "$SUDO_COMMAND" ]; then
|
||||
#it's a normal user doing "sudo su", or `sudo -i` or `sudo -s`
|
||||
#fine
|
||||
return 0
|
||||
_endswith "$SUDO_COMMAND" /bin/su || grep "^$SUDO_COMMAND\$" /etc/shells >/dev/null 2>&1
|
||||
return $?
|
||||
fi
|
||||
#otherwise
|
||||
return 1
|
||||
|
Loading…
Reference in New Issue
Block a user