Browse Source
update dns_dp.sh support chinese response message
pull/2927/head
Kidd Yu
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
3 deletions
-
dnsapi/dns_dp.sh
|
|
@ -75,7 +75,7 @@ dns_dp_rm() { |
|
|
return 1 |
|
|
return 1 |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
_contains "$response" "successful" |
|
|
|
|
|
|
|
|
_contains "$response" "successful" || _contains "$response" 'code":"1"' |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -93,7 +93,7 @@ add_record() { |
|
|
return 1 |
|
|
return 1 |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
_contains "$response" "successful" || _contains "$response" "Domain record already exists" |
|
|
|
|
|
|
|
|
_contains "$response" "successful" || _contains "$response" "Domain record already exists" || _contains "$response" 'code":"1"' || _contains "$response" 'code":"104"' |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
#################### Private functions below ################################## |
|
|
#################### Private functions below ################################## |
|
|
@ -117,7 +117,7 @@ _get_root() { |
|
|
return 1 |
|
|
return 1 |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
if _contains "$response" "successful"; then |
|
|
|
|
|
|
|
|
if _contains "$response" "successful" || _contains "$response" 'code":"1"'; then |
|
|
_domain_id=$(printf "%s\n" "$response" | _egrep_o "\"id\":\"[^\"]*\"" | cut -d : -f 2 | tr -d \") |
|
|
_domain_id=$(printf "%s\n" "$response" | _egrep_o "\"id\":\"[^\"]*\"" | cut -d : -f 2 | tr -d \") |
|
|
_debug _domain_id "$_domain_id" |
|
|
_debug _domain_id "$_domain_id" |
|
|
if [ "$_domain_id" ]; then |
|
|
if [ "$_domain_id" ]; then |
|
|
|