diff --git a/dnsapi/dns_cpaneldns.sh b/dnsapi/dns_cpaneldns.sh index a5cf4bb2..1562e6a4 100755 --- a/dnsapi/dns_cpaneldns.sh +++ b/dnsapi/dns_cpaneldns.sh @@ -217,7 +217,7 @@ _dns_cpaneldns_get_record() { fi if $response; then - recordlist="$(echo "$response" | tr '{' "\n" | grep "$record" | _head_n 1 )" + recordlist="$(echo "$response" | tr '{' "\n" | grep "$record" | _head_n 1)" record_id="$(echo "$recordlist" | tr ',' "\n" | grep -E '^"line"' | sed -re 's/^\"line\"\:\"([0-9]+)\"$/\1/g' | cut -d ":" -f 2)" echo "$record_id"