unbound: maintain a consistent dnsbl cache state

In situations where a cache does not exist (mainly boot), a start/stop/restart of unbound
should make the system aware of the current dnsbl configuration in order to properly diff
on it. This includes unbound starting on boot.
This commit is contained in:
Stephan de Wit 2022-10-03 14:17:37 +02:00
parent 00bb9e273b
commit e101c6040d

View File

@ -379,6 +379,8 @@ function unbound_configure_do($verbose = false, $unused = '')
}
}
copy('/usr/local/etc/unbound.opnsense.d/dnsbl.conf', '/tmp/unbound_dnsbl.cache');
mwexecf_bg('/usr/local/bin/flock -n -E 0 -o /tmp/unbound_start.lock /usr/local/opnsense/scripts/unbound/start.sh %s', [$domain]);
if ($verbose) {