mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-05-10 14:12:43 +00:00
Fetch object with _egrep_o function
This commit is contained in:
parent
731b34a015
commit
ae2fe2562b
@ -149,10 +149,9 @@ _dns_cloudns_get_zone_info() {
|
|||||||
zone=$1
|
zone=$1
|
||||||
_dns_cloudns_http_api_call "dns/get-zone-info.json" "domain-name=$zone"
|
_dns_cloudns_http_api_call "dns/get-zone-info.json" "domain-name=$zone"
|
||||||
if ! _contains "$response" "\"status\":\"Failed\""; then
|
if ! _contains "$response" "\"status\":\"Failed\""; then
|
||||||
DOMAIN_TYPE=$(echo "$response" | tr ',' "\n" | grep -E '^"type"' | sed -re 's/^\"type\"\:\"([a-z]+)\"$/\1/g')
|
DOMAIN_TYPE=$(echo "$response" | _egrep_o '"type":"[^"]*"' | cut -d : -f 2 | tr -d '"')
|
||||||
if _contains "$DOMAIN_TYPE" "cloud"; then
|
if _contains "$DOMAIN_TYPE" "cloud"; then
|
||||||
DOMAIN_MASTER=$(echo "$response" | tr ',' "\n" | grep -E '^"cloud-master"' | sed -re 's/^\"cloud-master\"\:\"([a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]\.[a-zA-Z]{2,}+)\"}$/\1/g'
|
DOMAIN_MASTER=$(echo "$response" | _egrep_o '"cloud-master":"[^"]*"' | cut -d : -f 2 | tr -d '"')
|
||||||
)
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user