ispman/bin ispman.loganalyzer,1.9,1.9.2.1 ispman.makelogs,1.24,1.24.2.1

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-serv19056/bin

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

Index: ispman.loganalyzer
===================================================================
RCS file: /cvsroot/ispman/ispman/bin/ispman.loganalyzer,v
retrieving revision 1.9
retrieving revision 1.9.2.1
diff -u -d -r1.9 -r1.9.2.1
--- ispman.loganalyzer	30 May 2004 23:35:32 -0000	1.9
+++ ispman.loganalyzer	9 Oct 2005 18:33:00 -0000	1.9.2.1
@@ -4,9 +4,9 @@
     unshift @INC,
       ( $FindBin::Bin, "$FindBin::Bin/../lib", "$FindBin::Bin/../conf" );
     use Getopt::Std;
-    getopt( 'c', \%opts );
+    getopt( 'cq', \%opts );
     unless ( $opts{'c'} && $ARGV[0] ) {
-        print "$0 -c /path/to/webalizer vhost_directory";
+        print "$0 [-q] -c /path/to/webalizer vhost_directory";
         print "\n";
         exit;
     }
@@ -14,6 +14,13 @@
 
 @dir       = @ARGV;
 $webalizer = $opts{'c'};
+$quiet     = $opts{'q'};
+
+if ($quiet) {
+       $quiet = "-q";
+} else {
+       $quiet = "";
+}
 
 $mon->{'Jan'} = 1;
 $mon->{'Feb'} = 2;
@@ -56,7 +63,7 @@
 
     for $log (@logs) {
         $cmd =
-"$webalizer -p -n $sitename  -o $dir/report -t 'Log Report'  $dir/raw/$log\n";
+"$webalizer $quiet -p -n $sitename  -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.24
retrieving revision 1.24.2.1
diff -u -d -r1.24 -r1.24.2.1
--- ispman.makelogs	20 Jun 2004 09:38:11 -0000	1.24
+++ ispman.makelogs	9 Oct 2005 18:33:00 -0000	1.24.2.1
@@ -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,7 @@
     if ( -e $webalizer ) {
         print "  Building report for $servername\n";
         my $cmd =
-"perl  $FindBin::Bin/ispman.loganalyzer -c $webalizer -d $vhostDirectory";
+"perl  $FindBin::Bin/ispman.loganalyzer $quiet -c $webalizer -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.