mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-12 20:16:49 +02:00
unbound-dhcp-leases-bridge: Initialize at startup
When the process starts, we will now load all static hosts and leases and reload Unbound to have a defined state to start with. Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -98,6 +98,12 @@ class UnboundDHCPLeasesBridge(object):
|
||||
self.unbound = UnboundConfigWriter(unbound_leases_file)
|
||||
self.running = False
|
||||
|
||||
# Read all static hosts
|
||||
self.hosts = self.read_static_hosts()
|
||||
|
||||
# Unconditionally update all leases and reload Unbound
|
||||
self.update_dhcp_leases()
|
||||
|
||||
def run(self):
|
||||
log.info("Unbound DHCP Leases Bridge started on %s" % self.leases_file)
|
||||
self.running = True
|
||||
|
||||
Reference in New Issue
Block a user