added better rootdb handling

This commit is contained in:
ElevenNotes
2023-09-19 10:14:16 +02:00
parent c5d789a5ab
commit efd1de1f5e
3 changed files with 14 additions and 4 deletions

View File

@@ -1,5 +1,10 @@
#!/bin/ash
if [ -z "${1}" ]; then
if [ ! -f "/bind/var/root.db" ]; then
rootdb
fi
set -- "named" \
-fg \
-c "/bind/etc/named.conf" \

View File

@@ -1,2 +1,8 @@
#!/bin/ash
dig +bufsize=1200 +norec NS . @a.root-servers.net | egrep -v ';|^$' | egrep -v '\S.+AAAA.+|^$' | sort > /bind/var/root.db
if [ ! -f "/bind/var/root.db" ]; then
ROOT_DB_NS=198.41.0.4
else
ROOT_DB_NS=a.root-servers.net
fi
dig +bufsize=1200 +norec NS . @${ROOT_DB_NS} | egrep -v ';|^$' | egrep -v '\S.+AAAA.+|^$' | sort > /bind/var/root.db