neil 2020-11-22 12:19:52 +08:00
parent 199ca77c2a
commit 1a163243ec
1 changed files with 3 additions and 3 deletions

View File

@ -75,7 +75,7 @@ dns_dpi_rm() {
return 1 return 1
fi fi
_contains "$response" "Action completed successful" _contains "$response" "Operation successful"
} }
@ -93,7 +93,7 @@ add_record() {
return 1 return 1
fi fi
_contains "$response" "Action completed successful" || _contains "$response" "Domain record already exists" _contains "$response" "Operation successful" || _contains "$response" "Domain record already exists"
} }
#################### Private functions below ################################## #################### Private functions below ##################################
@ -117,7 +117,7 @@ _get_root() {
return 1 return 1
fi fi
if _contains "$response" "Action completed successful"; then if _contains "$response" "Operation successful"; 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