Add a tool for debug purposes: json2bind9
parent
891be61722
commit
d1f890f869
|
@ -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
|
Loading…
Reference in New Issue