Fix Webalizer path generation
authorAdam Chlipala <adamc@hcoop.net>
Tue, 12 Dec 2006 03:06:50 +0000 (03:06 +0000)
committerAdam Chlipala <adamc@hcoop.net>
Tue, 12 Dec 2006 03:06:50 +0000 (03:06 +0000)
src/plugins/webalizer.sml

index 2237fe5..c6043af 100644 (file)
@@ -33,6 +33,8 @@ val () = Apache.registerPre
                                   in
                                       TextIO.output (fd, "LogFile\t");
                                       TextIO.output (fd, Config.homeBase);
                                   in
                                       TextIO.output (fd, "LogFile\t");
                                       TextIO.output (fd, Config.homeBase);
+                                      TextIO.output (fd, "/");
+                                      TextIO.output (fd, user);
                                       TextIO.output (fd, "/apache/log/");
                                       TextIO.output (fd, node);
                                       TextIO.output (fd, "/");
                                       TextIO.output (fd, "/apache/log/");
                                       TextIO.output (fd, node);
                                       TextIO.output (fd, "/");
@@ -81,12 +83,16 @@ val () = Slave.registerFileHandler (fn fs =>
                                                                                ^ " -f "
                                                                                ^ Config.Webalizer.configDir
                                                                                ^ "/"
                                                                                ^ " -f "
                                                                                ^ Config.Webalizer.configDir
                                                                                ^ "/"
+                                                                               ^ Slave.hostname ()
+                                                                               ^ "/"
                                                                                ^ base
                                                                                ^ ".conf"));
                                                     ignore (OS.Process.system (Config.rm
                                                                                ^ " -rf "
                                                                                ^ Config.Webalizer.outputDir
                                                                                ^ "/"
                                                                                ^ base
                                                                                ^ ".conf"));
                                                     ignore (OS.Process.system (Config.rm
                                                                                ^ " -rf "
                                                                                ^ Config.Webalizer.outputDir
                                                                                ^ "/"
+                                                                               ^ Slave.hostname ()
+                                                                               ^ "/"
                                                                                ^ base)))
                                                  | _ =>
                                                    (ignore (OS.Process.system (Config.cp
                                                                                ^ base)))
                                                  | _ =>
                                                    (ignore (OS.Process.system (Config.cp
@@ -95,10 +101,12 @@ val () = Slave.registerFileHandler (fn fs =>
                                                                                ^ " "
                                                                                ^ Config.Webalizer.configDir
                                                                                ^ "/"
                                                                                ^ " "
                                                                                ^ Config.Webalizer.configDir
                                                                                ^ "/"
+                                                                               ^ Slave.hostname ()
+                                                                               ^ "/"
                                                                                ^ base
                                                                                ^ ".conf"));
                                                     let
                                                                                ^ base
                                                                                ^ ".conf"));
                                                     let
-                                                        val dir = Config.Webalizer.outputDir ^ "/" ^ base
+                                                        val dir = Config.Webalizer.outputDir ^ "/" ^ Slave.hostname () ^ "/" ^ base
                                                     in
                                                         if Posix.FileSys.access (dir, []) then
                                                             ()
                                                     in
                                                         if Posix.FileSys.access (dir, []) then
                                                             ()