ispman/bin ispman.loganalyzer,1.10,1.11 ispman.makelogs,1.26,1.27

Joerg Delker <[email protected]>
Newsgroups gmane.comp.isp.ispman.cvs
Message-ID <[email protected]>
Update of /cvsroot/ispman/ispman/bin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21008/bin

Modified Files:
	ispman.loganalyzer ispman.makelogs 
Log Message:
added quiet flag (-q) for less webalizer output
(merged from rel_1_2-bugfixes)

Index: ispman.loganalyzer
===================================================================
RCS file: /cvsroot/ispman/ispman/bin/ispman.loganalyzer,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- ispman.loganalyzer	8 Jul 2004 09:35:49 -0000	1.10
+++ ispman.loganalyzer	9 Oct 2005 18:39:41 -0000	1.11
@@ -4,9 +4,9 @@
     unshift @INC,
       ( $FindBin::Bin, "$FindBin::Bin/../lib", "$FindBin::Bin/../conf" );
     use Getopt::Std;
-    getopt( 'ch', \%opts );
+    getopt( 'cqh', \%opts );
     unless ( $opts{'c'} && $ARGV[0] ) {
-        print "$0 -c /path/to/webalizer -h servername -d vhost_directory";
+        print "$0 [-q] -c /path/to/webalizer -h servername -d vhost_directory";
         print "\n";
         exit;
     }
@@ -15,6 +15,13 @@
 @dir       = @ARGV;
 $webalizer = $opts{'c'};
 $servername = $opts{'h'};
+$quiet     = $opts{'q'};
+
+if ($quiet) {
+       $quiet = "-q";
+} else {
+       $quiet = "";
+}
 
 $mon->{'Jan'} = 1;
 $mon->{'Feb'} = 2;
@@ -57,7 +64,8 @@
 
     for $log (@logs) {
         $cmd =
-"$webalizer -p -n $servername  -o $dir/report -t 'Log Report'  $dir/raw/$log\n";
+"$webalizer $quiet -p -n $servername  -o $dir/report -t 'Log Report'  $dir/raw/$log\n";
+
         if ( $opts{'n'} ) {
             print $cmd;
             next;

Index: ispman.makelogs
===================================================================
RCS file: /cvsroot/ispman/ispman/bin/ispman.makelogs,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- ispman.makelogs	7 Jun 2005 19:57:26 -0000	1.26
+++ ispman.makelogs	9 Oct 2005 18:39:41 -0000	1.27
@@ -106,6 +106,18 @@
     }
 }
 
+my (@NEWARGS);
+my $quiet = "";
+foreach my $arg (@ARGV) {
+        if ($arg == "-q") {
+                $quiet = $arg;
+        } else {
+                push(@NEWARGS, $arg);
+        }
+}
+
+@ARGV = @NEWARGS;
+
 if ( $ARGV[0] ) {
     print $ARGV[0], "\n";
     processAllServers( $ARGV[0] );
@@ -255,7 +267,8 @@
     if ( -e $webalizer ) {
         print "  Building report for $servername\n";
         my $cmd =
-"perl  $FindBin::Bin/ispman.loganalyzer -c $webalizer -h $servername -d $vhostDirectory";
+"perl  $FindBin::Bin/ispman.loganalyzer $quit -c $webalizer -h $servername -d $vhostDirectory";
+
         system($cmd);
     }
 }



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.