Add a tool for debug purposes: json2bind9

master
Philippe Pittoli 2024-02-24 18:57:58 +01:00
parent 891be61722
commit d1f890f869
1 changed files with 13 additions and 0 deletions

13
tools/json2bind9.cr Normal file
View File

@ -0,0 +1,13 @@
require "json"
require "../src/storage/zone.cr"
alias DSZ = DNSManager::Storage::Zone
if ARGV.size < 1
puts "usage: json2bind9 zone.json"
exit 0
end
domain = ARGV[0]
zone = DSZ.from_json (File.read domain)
zone.to_bind9 STDOUT