Generate zone files when the domain is delegated.

This commit is contained in:
Philippe Pittoli 2025-12-23 14:38:25 +01:00
parent 3e16297d0c
commit 5f2f38f6f4

View file

@ -108,7 +108,7 @@ class DNSManager::Storage
zone = zone_must_exist! domain zone = zone_must_exist! domain
if delegation = zone.delegation if delegation = zone.delegation
Baguette::Log.info "zone #{domain} is delegated" zone.update_delegation @delegationdir
return return
end end
@ -361,8 +361,7 @@ class DNSManager::Storage
zone.update_serial zone.update_serial
zones_by_domain.update_or_create zone.domain, zone zones_by_domain.update_or_create zone.domain, zone
# Do not generate a bind9 file if the zone is delegated. generate_bind9_zonefile zone.domain
generate_bind9_zonefile zone.domain unless zone.delegation
end end
def update_rr(user_id : UserDataID, domain : String, rr : Zone::ResourceRecord) : IPC::JSON def update_rr(user_id : UserDataID, domain : String, rr : Zone::ResourceRecord) : IPC::JSON