File:
[LON-CAPA] /
doc /
loncapafiles /
logcleanup.piml
Revision
1.1:
download - view:
text,
annotated -
select for diffs
Fri Jul 8 15:46:40 2005 UTC (19 years, 3 months ago) by
www
Branches:
MAIN
CVS tags:
version_2_1_1,
version_2_1_0,
version_2_0_X,
version_2_0_99_1,
version_2_0_2,
version_2_0_1,
version_2_0_0,
version_1_99_3,
version_1_99_2,
HEAD
Bug #3996: log spam removal
<!DOCTYPE piml PUBLIC "-//TUX/DTD piml 1.0 Final//EN"
"http://lpml.sourceforge.net/DTD/piml.dtd">
<!-- logcleanup.piml -->
<!-- $Id: logcleanup.piml,v 1.1 2005/07/08 15:46:40 www Exp $ -->
<!--
This file is part of the LearningOnline Network with CAPA (LON-CAPA).
LON-CAPA is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
LON-CAPA is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with LON-CAPA; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
/home/httpd/html/adm/gpl.txt
http://www.lon-capa.org/
-->
<piml>
<targetroot>/</targetroot>
<files>
<file>
<target dist='default'>/home/httpd/perl/logs/lonnet.perm.log</target>
<perlscript mode='fg'>
unless
(-e '<TARGET />') # Does file exist?
{
print("**** ERROR **** Missing <TARGET />\n");
} else {
system('cp <TARGET /> <TARGET />.old');
open(IN,'<TARGET />.old');
open(OUT,'><TARGET />');
while ($line=<IN>) {
unless ($line=~/signalled to death/) {
print OUT $line;
}
}
close(IN);
close(OUT);
system('chown www:www <TARGET />');
system('rm <TARGET />.old');
}
</perlscript>
</file>
</files>
</piml>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>