Browse Source

Fetch DNS records does not work with filter on hostname. My error, name in the API resembles the domain name not host name. No way to check on hostname in fetch_records function so sticking to TXT record filter.

pull/1764/head
Klaas Eenkhoorn 7 years ago
parent
commit
2d55c97a19
  1. 3
      dnsapi/dns_cpaneldns.sh

3
dnsapi/dns_cpaneldns.sh

@ -189,7 +189,8 @@ _dns_cpaneldns_get_record() {
_debug host "$host"
_debug record "$record"
_dns_cpaneldns_http_api_call "cpanel_jsonapi_module=ZoneEdit" "cpanel_jsonapi_func=fetchzone_records&domain=$zone&$name=$host&type=TXT&txtdata=$record"
_dns_cpaneldns_http_api_call "cpanel_jsonapi_module=ZoneEdit" "cpanel_jsonapi_func=fetchzone_records&domain=$zone&type=TXT&txtdata=$record"
if ! _contains "$response" "\"line\":"; then
_info "No records left matching TXT host."
record_id=""

Loading…
Cancel
Save