From cd9191451d8d1783c2d08f565a7f34745bdb6add Mon Sep 17 00:00:00 2001 From: jbond Date: Tue, 24 Oct 2023 19:53:50 +0200 Subject: [PATCH] unbond.conf: prefer trust_anchor_file to auto_trust_anchor_file The config only supports having trust_anchor_file or auto_trust_anchor_file. this updates the code to use trust_anchor_file if it is set (its undef by default) otherwise use auto_trust_anchor_file which has a default value. fixes #316 --- templates/unbound.conf.erb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/unbound.conf.erb b/templates/unbound.conf.erb index c9e13e7..2782922 100644 --- a/templates/unbound.conf.erb +++ b/templates/unbound.conf.erb @@ -172,8 +172,11 @@ server: <%- unless @module_config.empty? %> module-config: "<%= @module_config.join(' ') %>" <%- end -%> +<%- if @trust_anchor_file -%> <%= print_config('trust-anchor-file', @trust_anchor_file) -%> +<%- else -%> <%= print_config('auto-trust-anchor-file', @auto_trust_anchor_file) -%> +<%- end -%> <%= print_config('trust-anchor', @trust_anchor) -%> <%= print_config('trusted-keys-file', @trusted_keys_file) -%> <%= print_config('trust-anchor-signaling', @trust_anchor_signaling) -%>