mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-11-14 02:11:45 +00:00
check invalid status first.
This commit is contained in:
parent
fb2407386f
commit
aede5c486b
17
acme.sh
17
acme.sh
@ -4782,15 +4782,8 @@ $_authorizations_map"
|
|||||||
_debug2 response "$response"
|
_debug2 response "$response"
|
||||||
|
|
||||||
status=$(echo "$response" | _egrep_o '"status":"[^"]*' | cut -d : -f 2 | tr -d '"')
|
status=$(echo "$response" | _egrep_o '"status":"[^"]*' | cut -d : -f 2 | tr -d '"')
|
||||||
if _contains "$status" '"valid"'; then
|
|
||||||
_info "$(__green Success)"
|
|
||||||
_stopserver "$serverproc"
|
|
||||||
serverproc=""
|
|
||||||
_clearupwebbroot "$_currentRoot" "$removelevel" "$token"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$status" = "invalid" ]; then
|
if _contains "$status" "invalid"; then
|
||||||
error="$(echo "$response" | _egrep_o '"error":\{[^\}]*')"
|
error="$(echo "$response" | _egrep_o '"error":\{[^\}]*')"
|
||||||
_debug2 error "$error"
|
_debug2 error "$error"
|
||||||
errordetail="$(echo "$error" | _egrep_o '"detail": *"[^"]*' | cut -d '"' -f 4)"
|
errordetail="$(echo "$error" | _egrep_o '"detail": *"[^"]*' | cut -d '"' -f 4)"
|
||||||
@ -4812,6 +4805,14 @@ $_authorizations_map"
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if _contains "$status" "valid"; then
|
||||||
|
_info "$(__green Success)"
|
||||||
|
_stopserver "$serverproc"
|
||||||
|
serverproc=""
|
||||||
|
_clearupwebbroot "$_currentRoot" "$removelevel" "$token"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$status" = "pending" ]; then
|
if [ "$status" = "pending" ]; then
|
||||||
_info "Pending"
|
_info "Pending"
|
||||||
elif [ "$status" = "processing" ]; then
|
elif [ "$status" = "processing" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user