|
From: Adam C. <ad...@us...> - 2008-07-15 19:47:20
|
Update of /cvsroot/hcoop/domtool2/src/tail In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv6489/src/tail Modified Files: tail.sml Log Message: Make domtool-tail actually work Index: tail.sml =================================================================== RCS file: /cvsroot/hcoop/domtool2/src/tail/tail.sml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tail.sml 15 Jul 2008 19:39:29 -0000 1.1 --- tail.sml 15 Jul 2008 19:47:14 -0000 1.2 *************** *** 38,47 **** in case args of ! [vhost] => let val uid = Posix.ProcEnv.getuid () val uname = Posix.SysDB.Passwd.name (Posix.SysDB.getpwuid uid) ! val proc = Unix.execute ("/usr/local/bin/domtool-admin-sudo-noisy", ["perms", uname]) val inf = Unix.textInstreamOf proc --- 38,54 ---- in case args of ! [vhost, kind] => let + val () = case kind of + "access" => () + | "error" => () + | "rewrite" => () + | _ => (print "Unsupported logfile kind. Use 'access', 'error', or 'rewrite'.\n"; + OS.Process.exit OS.Process.failure) + val uid = Posix.ProcEnv.getuid () val uname = Posix.SysDB.Passwd.name (Posix.SysDB.getpwuid uid) ! val proc = Unix.execute ("/usr/local/bin/domtool-admin", ["perms", uname]) val inf = Unix.textInstreamOf proc *************** *** 74,78 **** ^ hostname () ^ "/" ! ^ vhost] val tailArgs = --- 81,88 ---- ^ hostname () ^ "/" ! ^ vhost ! ^ "/" ! ^ kind ! ^ ".log"] val tailArgs = |