diff --git a/contrib/dnsupdate b/contrib/dnsupdate index d7c4813d..2eed037a 100644 --- a/contrib/dnsupdate +++ b/contrib/dnsupdate @@ -6,7 +6,7 @@ set -euo pipefail # Zone to request from bintcoin-seeder -ZONE=dnsseed.example.com +ZONE=dnsseed.emzy.de # Filters to fetch FILTERS='x1 x5 x9 xd x49 x400 x404 x408 x40c x448' @@ -17,9 +17,9 @@ FILTERS='x1 x5 x9 xd x49 x400 x404 x408 x40c x448' echo update delete ${ZONE} a echo update delete ${ZONE} aaaa for proto in A AAAA ; do - dig -t ${proto} -p 5353 @127.0.0.1 ${ZONE} | \ - grep -i "^${ZONE}.*[[:space:]]A" | \ - awk '{ print "update add "$1" 3600 "$4" "$5"" }' + dig +noall +answer -t ${proto} -p 15353 @52.37.101.214 ${ZONE} | \ + awk '{ print "update add "$1" 3600 "$4" "$5"" }' + done echo send ) | \ @@ -27,15 +27,14 @@ nsupdate -v # Fetch and update A and AAAA records of all available FILTER domain names for filter in ${FILTERS} ; do - ( + ( echo server localhost echo zone ${ZONE} echo update delete ${filter}.${ZONE} a echo update delete ${filter}.${ZONE} aaaa for proto in A AAAA ; do - dig -t ${proto} -p 5353 @127.0.0.1 ${filter}.${ZONE} | \ - grep -i "^${filter}.*[[:space:]]A" | \ - awk '{ print "update add "$1" 3600 "$4" "$5"" }' + dig +noall +answer -t ${proto} -p 15353 @52.37.101.214 ${filter}.${ZONE} | \ + awk '{ print "update add "$1" 3600 "$4" "$5"" }' done echo send ) | \