Commit 58c2c701 authored by neil's avatar neil
Browse files
parent ad9f488d
...@@ -130,7 +130,7 @@ dns_cf_rm() { ...@@ -130,7 +130,7 @@ dns_cf_rm() {
_err "Delete record error." _err "Delete record error."
return 1 return 1
fi fi
_contains "$response" '"success":true' echo "$response" | tr -d " " | grep \"success\":true >/dev/null
fi fi
} }
...@@ -151,7 +151,7 @@ _get_root() { ...@@ -151,7 +151,7 @@ _get_root() {
if ! _cf_rest GET "zones/$CF_Zone_ID"; then if ! _cf_rest GET "zones/$CF_Zone_ID"; then
return 1 return 1
else else
if _contains "$response" '"success":true'; then if echo "$response" | tr -d " " | grep \"success\":true >/dev/null; then
_domain=$(echo "$response" | _egrep_o "\"name\": *\"[^\"]*\"" | cut -d : -f 2 | tr -d \" | _head_n 1 | tr -d " ") _domain=$(echo "$response" | _egrep_o "\"name\": *\"[^\"]*\"" | cut -d : -f 2 | tr -d \" | _head_n 1 | tr -d " ")
if [ "$_domain" ]; then if [ "$_domain" ]; then
_cutlength=$((${#domain} - ${#_domain} - 1)) _cutlength=$((${#domain} - ${#_domain} - 1))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment