This is deliberately not backed up since there zones will have to be
fetched in their entirety anyways.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
local name, status, comment, enabled_zones, custom_acl = unpack(fields)
if status == "on" then
- local path = string.format("/var/cache/knot-resolver/rpzs/%s.zone", name)
+ local path = string.format("/var/lib/knot-resolver/zones/%s.zone", name)
-- Ensure the zone exists
if io.open(path) then
var/lib/knot-resolver
var/lib/knot-resolver/leases.db
var/lib/knot-resolver/root.keys
+var/lib/knot-resolver/zones
# Change the ownership of /var/lib/knot-resolver
chown knot-resolver:knot-resolver /var/lib/knot-resolver
+ # Create a directory for zone files
+ -mkdir -pv /var/lib/knot-resolver/zones
+ chown knot-resolver:knot-resolver /var/lib/knot-resolver/zones
+
# Create cache directory
-mkdir -pv /var/cache/knot-resolver
chown knot-resolver:knot-resolver /var/cache/knot-resolver
# #
###############################################################################
-readonly SYNC_PATH="/var/cache/knot-resolver/rpzs"
+readonly SYNC_PATH="/var/lib/knot-resolver/zones"
readonly ZONE_SYNC_ARGS=(
# Be quiet