Update of /cvsroot/hcoop/domtool2/src/plugins In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv2648/src/plugins
Modified Files: apache.sml Log Message: Changing handling of Apache log rename/delete Index: apache.sml =================================================================== RCS file: /cvsroot/hcoop/domtool2/src/plugins/apache.sml,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** apache.sml 23 May 2008 15:19:26 -0000 1.80 --- apache.sml 15 Jul 2008 14:31:13 -0000 1.81 *************** *** 244,251 **** val vhostsChanged = ref false val logDeleted = ref false val () = Slave.registerPreHandler (fn () => (vhostsChanged := false; ! logDeleted := false)) fun findVhostUser fname = --- 244,253 ---- val vhostsChanged = ref false val logDeleted = ref false + val delayedLogMoves = ref (fn () => ()) val () = Slave.registerPreHandler (fn () => (vhostsChanged := false; ! logDeleted := false; ! delayedLogMoves := (fn () => print "Executing delayed log moves/deletes.\n"))) fun findVhostUser fname = *************** *** 340,348 **** let val ldir = realLogDir oldUser in if !logDeleted then () else ! (ignore (OS.Process.system (down ())); ignore (OS.Process.system (fixperms ())); logDeleted := true); --- 342,351 ---- let val ldir = realLogDir oldUser + val dlm = !delayedLogMoves in if !logDeleted then () else ! ((*ignore (OS.Process.system (down ()));*) ignore (OS.Process.system (fixperms ())); logDeleted := true); *************** *** 350,355 **** ^ " -rf " ^ realVhostFile)); ! Slave.moveDirCreate {from = ldir, ! to = backupLogs ()} end | Slave.Add => --- 353,359 ---- ^ " -rf " ^ realVhostFile)); ! delayedLogMoves := (fn () => (dlm (); ! Slave.moveDirCreate {from = ldir, ! to = backupLogs ()})) end | Slave.Add => *************** *** 379,391 **** val old = realLogDir oldUser val rld = realLogDir user in if !logDeleted then () else ! (ignore (OS.Process.system (down ())); logDeleted := true); ! ignore (OS.Process.system (Config.rm ! ^ " -rf " ! ^ realLogDir oldUser)); if Posix.FileSys.access (rld, []) then () --- 383,398 ---- val old = realLogDir oldUser val rld = realLogDir user + + val dlm = !delayedLogMoves in if !logDeleted then () else ! ((*ignore (OS.Process.system (down ()));*) logDeleted := true); ! delayedLogMoves := (fn () => (dlm (); ! ignore (OS.Process.system (Config.rm ! ^ " -rf " ! ^ realLogDir oldUser)))); if Posix.FileSys.access (rld, []) then () *************** *** 404,409 **** (fn () => (if !vhostsChanged then ! Slave.shellF ([if !logDeleted then undown () else reload ()], ! fn cl => "Error reloading Apache with " ^ cl) else ())) --- 411,417 ---- (fn () => (if !vhostsChanged then ! (Slave.shellF ([reload ()], ! fn cl => "Error reloading Apache with " ^ cl); ! if !logDeleted then !delayedLogMoves () else ()) else ())) ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ hcoop-cvs mailing list hcoop-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hcoop-cvs