Maintained by: NLnet Labs

[Unbound-users] [wishlist] unbound vs djbdns

Ondřej Surý
Tue Jun 14 09:44:02 CEST 2011


On Mon, Jun 13, 2011 at 21:38, richard lucassen
<mailinglists at lucassen.org> wrote:
> Hello list,
>
> [...]
> Into the config file. This is not so much work, but if there are many of
> these entries...

Then you just use a shell script to generate the config? I don't think
that unbound needs a feature which can be accomplished by simple shell
or awk script:

cd /etc/unbound/stub-zones;
for domain in *; do < $domain awk 'BEGIN { print "stub-zone:\n\tname:
\"'${domain}'\""; } { print "\tstub-host: \""$0"\""; } END { print "";
}'; done > /etc/unbound/stub-zones.conf

and add

include: "/etc/unbound/stub-zones.conf"

to your unbound.conf

O.
-- 
Ondřej Surý <ondrej at sury.org>