Commit 8ef36e12 authored by Colin Shea's avatar Colin Shea

append `.zone` to the generated files

parent 7812abba
...@@ -52,7 +52,7 @@ class ZoneGenerator ...@@ -52,7 +52,7 @@ class ZoneGenerator
new_zonefile = zone.zonefile new_zonefile = zone.zonefile
# path to the deployed version # path to the deployed version
old_file = "#{@config[:zones_dir]}/#{domain}" old_file = "#{@config[:zones_dir]}/#{domain}.zone"
# is there already a deployed version? # is there already a deployed version?
if File.exists?(old_file) if File.exists?(old_file)
...@@ -79,7 +79,7 @@ class ZoneGenerator ...@@ -79,7 +79,7 @@ class ZoneGenerator
end end
# Write new zonefile # Write new zonefile
output_file_path = "#{@tmp_zones}/#{domain}" output_file_path = "#{@tmp_zones}/#{domain}.zone"
FileUtils.mkdir_p File.dirname(output_file_path) FileUtils.mkdir_p File.dirname(output_file_path)
File.open(output_file_path, "w"){|f| f.write new_output } File.open(output_file_path, "w"){|f| f.write new_output }
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment