plugin/file: trigger reload of zones based on mtime (#8085)

* Added fs.FileInfo.ModTime() based reload feature

Signed-off-by: Endre Szabo <git@end.re>

* Updated the plugin documentation.

Signed-off-by: Endre Szabo <git@end.re>

---------

Signed-off-by: Endre Szabo <git@end.re>
This commit is contained in:
Endre Szabo
2026-05-20 04:43:46 +02:00
committed by GitHub
parent ee7ff82cf5
commit 35391dd8a9
6 changed files with 283 additions and 4 deletions

View File

@@ -27,6 +27,7 @@ If you want to round-robin A and AAAA responses look at the *loadbalance* plugin
~~~
file DBFILE [ZONES... ] {
reload DURATION
reload_by_mtime
fallthrough [ZONES...]
}
~~~
@@ -34,6 +35,8 @@ file DBFILE [ZONES... ] {
* `reload` interval to perform a reload of the zone if the SOA version changes. Default is one minute.
Value of `0` means to not scan for changes and reload. For example, `30s` checks the zonefile every 30 seconds
and reloads the zone when serial changes.
* `reload_by_mtime` if set, decision to reload the zone will be based on the zone file modification time,
instead of change in the SOA serial.
* `fallthrough` If zone matches and no record can be generated, pass request to the next plugin.
If **[ZONES...]** is omitted, then fallthrough happens for all zones for which the plugin
is authoritative. If specific zones are listed (for example `in-addr.arpa` and `ip6.arpa`), then only