X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/blobdiff_plain/63ac3b82c1cd33605e62688cd97688a6dae3cb9c..d505bba1ca42e447925faa4f4d042d8378b77980:/src/plugins/bind.sml diff --git a/src/plugins/bind.sml b/src/plugins/bind.sml index 768478f..65c2ed8 100644 --- a/src/plugins/bind.sml +++ b/src/plugins/bind.sml @@ -35,7 +35,7 @@ val dns : Domain.files option ref = ref NONE val _ = Domain.registerBefore (fn _ => dns := Option.map (fn node => Domain.domainsFile {node = node, - name = "dns"}) + name = "dns.conf"}) (Domain.dnsMaster ())) val _ = Domain.registerAfter @@ -111,8 +111,8 @@ val record = fn (EApp ((EApp ((EVar "dnsA", _), e1), _), e2), _) => fun writeRecord (evs, r) = case !dns of - NONE => print ("Warning: DNS directive for " ^ Domain.currentDomain () - ^ " ignored because no master DNS server is configured for this domain\n") + NONE => () (* print ("Warning: DNS directive for " ^ Domain.currentDomain () + ^ " ignored because no master DNS server is configured for this domain\n") *) | SOME files => let fun write s = #write files s @@ -244,7 +244,7 @@ val () = Slave.registerFileHandler (fn fs => else let val inf = TextIO.openIn (OS.Path.joinDirFile {dir = #dir fs, - file = "soa"}) + file = "soa.conf"}) val kind = readLine inf val ttl = readILine inf val ns = readLine inf @@ -257,7 +257,7 @@ val () = Slave.registerFileHandler (fn fs => val min = readILine inf val () = TextIO.closeIn inf - val serialPath = OS.Path.joinDirFile {dir = Config.serialDir, + val serialPath = OS.Path.joinDirFile {dir = Config.Bind.serialDir, file = #domain fs} val oldSerial = let @@ -292,7 +292,7 @@ val () = Slave.registerFileHandler (fn fs => val _ = TextIO.closeOut outf val dns = OS.Path.joinDirFile {dir = #dir fs, - file = "dns"} + file = "dns.conf"} val fname = OS.Path.joinBaseExt {base = #domain fs, ext = SOME "zone"} @@ -329,8 +329,8 @@ val () = Slave.registerFileHandler (fn fs => end in case file of - "soa" => dnsChanged () - | "dns" => dnsChanged () + "soa.conf" => dnsChanged () + | "dns.conf" => dnsChanged () | "named.conf" => namedChanged := true | _ => () end) @@ -348,13 +348,13 @@ val () = Slave.registerPostHandler ())) val () = Domain.registerResetLocal (fn () => - ignore (OS.Process.system (Config.rm ^ " -rf /var/domtool/zones/*"))) + ignore (OS.Process.system (Config.rm ^ " -rf " ^ Config.Bind.zonePath ^ "/*"))) val () = Domain.registerDescriber (Domain.considerAll [Domain.Filename {filename = "named.conf", heading = "named.conf addition:", showEmpty = false}, - Domain.Filename {filename = "dns", + Domain.Filename {filename = "dns.conf", heading = "DNS zonefile contents:", showEmpty = false}])