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.

This commit is contained in:
Klaas Eenkhoorn 2018-08-03 15:20:17 +02:00
parent 671434f7a0
commit 2d55c97a19

View File

@ -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=""