diff --git a/tools/json2bind9.cr b/tools/json2bind9.cr new file mode 100644 index 0000000..dd5d7cb --- /dev/null +++ b/tools/json2bind9.cr @@ -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