Annotation of doc/loncapafiles/logcleanup.piml, revision 1.1

1.1     ! www         1: <!DOCTYPE piml PUBLIC "-//TUX/DTD piml 1.0 Final//EN" 
        !             2: 	"http://lpml.sourceforge.net/DTD/piml.dtd">
        !             3: <!-- logcleanup.piml -->
        !             4: 
        !             5: <!-- $Id: sanitycheck.piml,v 1.16 2005/03/01 03:40:47 albertel Exp $ -->
        !             6: 
        !             7: <!--
        !             8: 
        !             9: This file is part of the LearningOnline Network with CAPA (LON-CAPA).
        !            10: 
        !            11: LON-CAPA is free software; you can redistribute it and/or modify
        !            12: it under the terms of the GNU General Public License as published by
        !            13: the Free Software Foundation; either version 2 of the License, or
        !            14: (at your option) any later version.
        !            15: 
        !            16: LON-CAPA is distributed in the hope that it will be useful,
        !            17: but WITHOUT ANY WARRANTY; without even the implied warranty of
        !            18: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        !            19: GNU General Public License for more details.
        !            20: 
        !            21: You should have received a copy of the GNU General Public License
        !            22: along with LON-CAPA; if not, write to the Free Software
        !            23: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
        !            24: 
        !            25: /home/httpd/html/adm/gpl.txt
        !            26: 
        !            27: http://www.lon-capa.org/
        !            28: 
        !            29: -->
        !            30: 
        !            31: <piml>
        !            32: <targetroot>/</targetroot>
        !            33: <files>
        !            34: <file>
        !            35: <target dist='default'>/home/httpd/perl/logs/lonnet.perm.log</target>
        !            36: <perlscript mode='fg'>
        !            37: unless
        !            38:     (-e '<TARGET />') # Does file exist?
        !            39:   {
        !            40:     print("**** ERROR **** Missing <TARGET />\n");
        !            41:   } else {
        !            42:       system('cp <TARGET /> <TARGET />.old');
        !            43:       open(IN,'<TARGET />.old');
        !            44:       open(OUT,'&gt;<TARGET />');
        !            45:       while ($line=&lt;IN&gt;) {
        !            46:          unless ($line=~/signalled to death/) {
        !            47:             print OUT $line;
        !            48:          }
        !            49:       }
        !            50:       close(IN);
        !            51:       close(OUT);
        !            52:       system('chown www:www <TARGET />'); 
        !            53:       system('rm <TARGET />.old'); 
        !            54:   }
        !            55: </perlscript>
        !            56: </file>
        !            57: </files>
        !            58: </piml>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>