Browse Source

Fix dns_loopia on FreeBSD

pull/4035/head
Christopher Cope 3 years ago
parent
commit
03c8309703
  1. 8
      dnsapi/dns_loopia.sh

8
dnsapi/dns_loopia.sh

@ -79,7 +79,7 @@ dns_loopia_rm() {
response="$(_post "$xml_content" "$LOOPIA_Api" "" "POST")" response="$(_post "$xml_content" "$LOOPIA_Api" "" "POST")"
if ! _contains "$response" "OK"; then if ! _contains "$response" "OK"; then
err_response=$(echo "$response" | grep -oPm1 "(?<=<string>)[^<]+")
err_response=$(echo "$response" | sed 's/.*<string>\(.*\)<\/string>.*/\1/')
_err "Error could not get txt records: $err_response" _err "Error could not get txt records: $err_response"
return 1 return 1
fi fi
@ -148,7 +148,7 @@ _loopia_get_records() {
response="$(_post "$xml_content" "$LOOPIA_Api" "" "POST")" response="$(_post "$xml_content" "$LOOPIA_Api" "" "POST")"
if ! _contains "$response" "<array>"; then if ! _contains "$response" "<array>"; then
err_response=$(echo "$response" | grep -oPm1 "(?<=<string>)[^<]+")
err_response=$(echo "$response" | sed 's/.*<string>\(.*\)<\/string>.*/\1/')
_err "Error: $err_response" _err "Error: $err_response"
return 1 return 1
fi fi
@ -245,7 +245,7 @@ _loopia_add_record() {
response="$(_post "$xml_content" "$LOOPIA_Api" "" "POST")" response="$(_post "$xml_content" "$LOOPIA_Api" "" "POST")"
if ! _contains "$response" "OK"; then if ! _contains "$response" "OK"; then
err_response=$(echo "$response" | grep -oPm1 "(?<=<string>)[^<]+")
err_response=$(echo "$response" | sed 's/.*<string>\(.*\)<\/string>.*/\1/')
_err "Error: $err_response" _err "Error: $err_response"
return 1 return 1
fi fi
@ -310,7 +310,7 @@ _loopia_add_sub_domain() {
response="$(_post "$xml_content" "$LOOPIA_Api" "" "POST")" response="$(_post "$xml_content" "$LOOPIA_Api" "" "POST")"
if ! _contains "$response" "OK"; then if ! _contains "$response" "OK"; then
err_response=$(echo "$response" | grep -oPm1 "(?<=<string>)[^<]+")
err_response=$(echo "$response" | sed 's/.*<string>\(.*\)<\/string>.*/\1/')
_err "Error: $err_response" _err "Error: $err_response"
return 1 return 1
fi fi

Loading…
Cancel
Save