Skip to content

Commit

Permalink
dnsmasq/unbound - mark 'template reload' action as cleanup.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
AdSchellevis committed Feb 26, 2025
1 parent b50a9ee commit 3e299b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/etc/inc/plugins.inc.d/dnsmasq.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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'])) {
Expand Down
1 change: 1 addition & 0 deletions src/etc/inc/plugins.inc.d/unbound.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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/*');
}

Expand Down

0 comments on commit 3e299b2

Please sign in to comment.