mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-05-02 12:32:48 +00:00
fixup! [FIX] Remove grep -oP and sed newline usage, other fixes
This commit is contained in:
parent
bd3f98daa6
commit
0ea6d632ba
@ -37,11 +37,18 @@ dns_versio_add() {
|
|||||||
_add_dns_record "TXT" "$fulldomain." "\\\"$txtvalue\\\"" 0 300
|
_add_dns_record "TXT" "$fulldomain." "\\\"$txtvalue\\\"" 0 300
|
||||||
_debug "dnsrecords after add record" "{\"dns_records\":[$_dns_records]}"
|
_debug "dnsrecords after add record" "{\"dns_records\":[$_dns_records]}"
|
||||||
|
|
||||||
if _versio_rest POST "domains/$_domain/update" "{\"dns_records\":[$_dns_records]}"; then
|
while [ "$j" -le 3 ]; do
|
||||||
_debug "rest update response" "$response"
|
_versio_rest POST "domains/$_domain/update" "{\"dns_records\":[$_dns_records]}"
|
||||||
_debug "changed dnsrecords" "$_dns_records"
|
if [ "$?" = "0" ]; then
|
||||||
return 0
|
_debug "rest update response" "$response"
|
||||||
fi
|
_debug "changed dnsrecords" "$_dns_records"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
if [ "$?" != "2" ]; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
j=$((j + 1))
|
||||||
|
done
|
||||||
|
|
||||||
_err "Error!"
|
_err "Error!"
|
||||||
return 1
|
return 1
|
||||||
@ -186,7 +193,7 @@ _versio_rest() {
|
|||||||
case $response in
|
case $response in
|
||||||
"<"*)
|
"<"*)
|
||||||
_err "Invalid non-JSON response! $response"
|
_err "Invalid non-JSON response! $response"
|
||||||
return 1
|
return 2 # retryable
|
||||||
;;
|
;;
|
||||||
"{\"error\":"*)
|
"{\"error\":"*)
|
||||||
_err "Error response! $response"
|
_err "Error response! $response"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user