Removes the Bind9 zone file.
This commit is contained in:
parent
2d64da170e
commit
98b5ed2638
@ -159,7 +159,7 @@ class DNSManager::Storage
|
||||
@domains << the_new_domain
|
||||
|
||||
# Add the new zone in the database.
|
||||
zones_by_domain.update_or_create domain, default_zone
|
||||
update_zone default_zone
|
||||
|
||||
Response::DomainAdded.new domain
|
||||
end
|
||||
@ -253,10 +253,7 @@ class DNSManager::Storage
|
||||
domains << Domain.new zone.domain
|
||||
end
|
||||
|
||||
# Add -or replace- the zone.
|
||||
zones_by_domain.update_or_create zone.domain, zone
|
||||
|
||||
generate_bind9_zonefile zone.domain
|
||||
update_zone zone
|
||||
|
||||
Response::Success.new
|
||||
end
|
||||
@ -277,8 +274,6 @@ class DNSManager::Storage
|
||||
|
||||
update_zone zone
|
||||
|
||||
generate_bind9_zonefile zone.domain
|
||||
|
||||
Response::RRAdded.new zone.domain, rr
|
||||
end
|
||||
|
||||
@ -334,9 +329,10 @@ class DNSManager::Storage
|
||||
Response::RRDeleted.new rrid
|
||||
end
|
||||
|
||||
# TODO: removes a Bind9 zonefile.
|
||||
# Removes a Bind9 zonefile.
|
||||
def remove_bind9_zonefile(domain : String) : Nil
|
||||
Baguette::Log.info "Removing a Bind9 zone file."
|
||||
File.delete "#{@zonefiledir}/#{domain}"
|
||||
end
|
||||
|
||||
# Deletes a domain.
|
||||
|
Loading…
Reference in New Issue
Block a user