|
Packit Bot |
ea69bd |
##########################################################################
|
|
Packit Bot |
ea69bd |
# $Id$
|
|
Packit Bot |
ea69bd |
##########################################################################
|
|
Packit Bot |
ea69bd |
# This is a wrapper for the eximstats program
|
|
Packit Bot |
ea69bd |
#
|
|
Packit Bot |
ea69bd |
# Please send all comments, suggestions, bug reports,
|
|
Packit Bot |
ea69bd |
# etc, to jeff.frost@frostconsultingllc.com and
|
|
Packit Bot |
ea69bd |
# logwatch-devel@lists.sourceforge.net
|
|
Packit Bot |
ea69bd |
########################################################
|
|
Packit Bot |
ea69bd |
|
|
Packit Bot |
ea69bd |
########################################################
|
|
Packit Bot |
ea69bd |
## Copyright (c) 2008 Jeff Frost
|
|
Packit Bot |
ea69bd |
## Covered under the included MIT/X-Consortium License:
|
|
Packit Bot |
ea69bd |
## http://www.opensource.org/licenses/mit-license.php
|
|
Packit Bot |
ea69bd |
## All modifications and contributions by other persons to
|
|
Packit Bot |
ea69bd |
## this script are assumed to have been donated to the
|
|
Packit Bot |
ea69bd |
## Logwatch project and thus assume the above copyright
|
|
Packit Bot |
ea69bd |
## and licensing terms. If you want to make contributions
|
|
Packit Bot |
ea69bd |
## under your own copyright or a different license this
|
|
Packit Bot |
ea69bd |
## must be explicitly stated in the contribution an the
|
|
Packit Bot |
ea69bd |
## Logwatch project reserves the right to not accept such
|
|
Packit Bot |
ea69bd |
## contributions. If you have made significant
|
|
Packit Bot |
ea69bd |
## contributions to this script and want to claim
|
|
Packit Bot |
ea69bd |
## copyright please contact logwatch-devel@lists.sourceforge.net.
|
|
Packit Bot |
ea69bd |
#########################################################
|
|
Packit Bot |
ea69bd |
|
|
Packit Bot |
ea69bd |
use Logwatch ':all';
|
|
Packit Bot |
ea69bd |
|
|
Packit Bot |
ea69bd |
$Debug = $ENV{'LOGWATCH_DEBUG'} || 0;
|
|
Packit Bot |
ea69bd |
$Detail = $ENV{'LOGWATCH_DETAIL_LEVEL'} || 0;
|
|
Packit Bot |
ea69bd |
|
|
Packit Bot |
ea69bd |
|
|
Packit Bot |
ea69bd |
my $SearchDate = TimeFilter("%Y-%m-%d %H:%M:%S");
|
|
Packit Bot |
ea69bd |
|
|
Packit Bot |
ea69bd |
if ( $Debug >= 5 ) {
|
|
Packit Bot |
ea69bd |
print STDERR "\n\nDEBUG: Inside eximstats Filter \n\n";
|
|
Packit Bot |
ea69bd |
$DebugCounter = 1;
|
|
Packit Bot |
ea69bd |
}
|
|
Packit Bot |
ea69bd |
|
|
Packit Bot |
ea69bd |
open(EXIMSTATS,"| $ENV{'eximstats'}");
|
|
Packit Bot |
ea69bd |
|
|
Packit Bot |
ea69bd |
while (defined($ThisLine = <STDIN>)) {
|
|
Packit Bot |
ea69bd |
|
|
Packit Bot |
ea69bd |
next unless $ThisLine =~ /^$SearchDate /o;
|
|
Packit Bot |
ea69bd |
|
|
Packit Bot |
ea69bd |
if ( $Debug >= 5 ) {
|
|
Packit Bot |
ea69bd |
print STDERR "DEBUG($DebugCounter): $ThisLine";
|
|
Packit Bot |
ea69bd |
$DebugCounter++;
|
|
Packit Bot |
ea69bd |
}
|
|
Packit Bot |
ea69bd |
print EXIMSTATS $ThisLine;
|
|
Packit Bot |
ea69bd |
}
|
|
Packit Bot |
ea69bd |
|
|
Packit Bot |
ea69bd |
close EXIMSTATS;
|
|
Packit Bot |
ea69bd |
|
|
Packit Bot |
ea69bd |
exit(0);
|
|
Packit Bot |
ea69bd |
|
|
Packit Bot |
ea69bd |
# vi: shiftwidth=3 tabstop=3 syntax=perl et
|
|
Packit Bot |
ea69bd |
# Local Variables:
|
|
Packit Bot |
ea69bd |
# mode: perl
|
|
Packit Bot |
ea69bd |
# perl-indent-level: 3
|
|
Packit Bot |
ea69bd |
# indent-tabs-mode: nil
|
|
Packit Bot |
ea69bd |
# End:
|