Browse Source

_contains instead of echo

dnsconf
Ivar Larsson 7 years ago
parent
commit
8995d3434f
  1. 4
      dnsapi/dns_loopia.sh

4
dnsapi/dns_loopia.sh

@ -187,7 +187,7 @@ _loopia_update_record() {
response="$(_post "$xml_content" "$LOOPIA_Api" "" "POST")" response="$(_post "$xml_content" "$LOOPIA_Api" "" "POST")"
if ! echo "$response" | grep "OK" >/dev/null; then
if ! _contains "$response" "OK"; then
_err "Error" _err "Error"
return 1 return 1
fi fi
@ -219,7 +219,7 @@ _loopia_add_record() {
response="$(_post "$xml_content" "$LOOPIA_Api" "" "POST")" response="$(_post "$xml_content" "$LOOPIA_Api" "" "POST")"
if ! echo "$response" | grep "OK" >/dev/null; then
if ! _contains "$response" "OK"; then
_err "Error" _err "Error"
return 1 return 1
fi fi

Loading…
Cancel
Save