X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/blobdiff_plain/613c338c012a0dcd1b8e97882f61c543264c146b..367eeec82144a470566629fc02a1967fb2a05909:/src/plugins/webalizer.sml diff --git a/src/plugins/webalizer.sml b/src/plugins/webalizer.sml index 2237fe5..b344165 100644 --- a/src/plugins/webalizer.sml +++ b/src/plugins/webalizer.sml @@ -32,11 +32,7 @@ val () = Apache.registerPre name = id ^ ".wbl"} in TextIO.output (fd, "LogFile\t"); - TextIO.output (fd, Config.homeBase); - TextIO.output (fd, "/apache/log/"); - TextIO.output (fd, node); - TextIO.output (fd, "/"); - TextIO.output (fd, hostname); + TextIO.output (fd, Apache.logDir {user = user, node = node, vhostId = hostname}); TextIO.output (fd, "/access.log\nOutputDir\t"); TextIO.output (fd, Config.Webalizer.outputDir); TextIO.output (fd, "/"); @@ -49,7 +45,7 @@ val () = Apache.registerPre in files := fds; write := (fn s => app (fn fd => TextIO.output (fd, s)) fds); - !write "Hostname\t"; + !write "HostName\t"; !write hostname; !write "\nHideSite\t"; !write hostname; @@ -81,12 +77,16 @@ val () = Slave.registerFileHandler (fn fs => ^ " -f " ^ Config.Webalizer.configDir ^ "/" + ^ Slave.hostname () + ^ "/" ^ base ^ ".conf")); ignore (OS.Process.system (Config.rm ^ " -rf " ^ Config.Webalizer.outputDir ^ "/" + ^ Slave.hostname () + ^ "/" ^ base))) | _ => (ignore (OS.Process.system (Config.cp @@ -95,10 +95,12 @@ val () = Slave.registerFileHandler (fn fs => ^ " " ^ Config.Webalizer.configDir ^ "/" + ^ Slave.hostname () + ^ "/" ^ base ^ ".conf")); let - val dir = Config.Webalizer.outputDir ^ "/" ^ base + val dir = Config.Webalizer.outputDir ^ "/" ^ Slave.hostname () ^ "/" ^ base in if Posix.FileSys.access (dir, []) then () @@ -108,4 +110,10 @@ val () = Slave.registerFileHandler (fn fs => | _ => () end) +val () = Domain.registerResetLocal (fn () => + app (fn (node, _) => + ignore (OS.Process.system (Config.rm ^ " -rf " + ^ Config.Webalizer.configDir ^ "/" + ^ node ^ "/*"))) Config.nodeIps) + end