From bcfc56323f477861c71568bfeb42c398c2c8f4ef Mon Sep 17 00:00:00 2001 From: Klaas Eenkhoorn Date: Fri, 3 Aug 2018 13:04:17 +0200 Subject: [PATCH] Incorporated changes after code analasys. --- dnsapi/dns_cpaneldns.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"