dnsmasq/unbound - mark 'template reload' action as cleanup.

Ideally these spots should not be needed as the frontend generates the configuration and on boot these are flushed as well, ... but, when interfaces change during boot or triggered by the wizard, these parts are not aware of these facts.

as discussed with @fichtner
This commit is contained in:
Ad Schellevis 2025-02-26 16:56:38 +01:00
parent b50a9eec0f
commit 3e299b29b9
2 changed files with 4 additions and 0 deletions

View File

@ -150,6 +150,9 @@ function dnsmasq_configure_do($verbose = false)
_dnsmasq_add_host_entries();
/* XXX: cleanup, should have been run, but interface changes during boot or wizard are messing things up */
configd_run('template reload OPNsense/Dnsmasq');
mwexec('/usr/local/etc/rc.d/dnsmasq start');
if (!empty($config['dnsmasq']['regdhcp'])) {

View File

@ -350,6 +350,7 @@ EOD;
chmod($root_hints_tmp, 0644);
rename($root_hints_tmp, '/var/unbound/root.hints');
/* XXX: cleanup, should have been run, but interface changes during boot or wizard are messing things up */
configd_run('template reload OPNsense/Unbound/*');
}