mirror of
https://github.com/Luzifer/dns.git
synced 2024-11-12 16:02:48 +00:00
Remove tmp.zone files if they are not moved in place
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
fd0bec2c55
commit
bbae3c1e22
1 changed files with 2 additions and 0 deletions
|
@ -122,6 +122,8 @@ def write_zone(zone, ttl, soa, nameserver, mailserver, entries):
|
|||
print("Generated and replaced zone file for {}".format(zone))
|
||||
diff_files("zones/db.{}".format(zone), "zones/tmp.{}".format(zone))
|
||||
os.rename("zones/tmp.{}".format(zone), "zones/db.{}".format(zone))
|
||||
else:
|
||||
os.unlink("zones/tmp.{}".format(zone))
|
||||
|
||||
|
||||
def main():
|
||||
|
|
Loading…
Reference in a new issue