ispman/bin ispman.loganalyzer,1.11,1.12 ispman.makelogs,1.27,1.28

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

Modified Files:
	ispman.loganalyzer ispman.makelogs 
Log Message:
fixes param inconsistencies
(merged from rel_1_2-bugfixes)


Index: ispman.loganalyzer
===================================================================
RCS file: /cvsroot/ispman/ispman/bin/ispman.loganalyzer,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- ispman.loganalyzer	9 Oct 2005 18:39:41 -0000	1.11
+++ ispman.loganalyzer	10 Oct 2005 20:18:23 -0000	1.12
@@ -4,9 +4,9 @@
     unshift @INC,
       ( $FindBin::Bin, "$FindBin::Bin/../lib", "$FindBin::Bin/../conf" );
     use Getopt::Std;
-    getopt( 'cqh', \%opts );
+    getopts( 'c:h:q', \%opts );
     unless ( $opts{'c'} && $ARGV[0] ) {
-        print "$0 [-q] -c /path/to/webalizer -h servername -d vhost_directory";
+        print "$0 [-q] [-h sitename] -c /path/to/webalizer vhost_directory";
         print "\n";
         exit;
     }
@@ -14,7 +14,7 @@
 
 @dir       = @ARGV;
 $webalizer = $opts{'c'};
-$servername = $opts{'h'};
+$sitename  = $opts{'h'};
 $quiet     = $opts{'q'};
 
 if ($quiet) {
@@ -39,10 +39,13 @@
 for $dir (@dir) {
     next unless -d $dir;
     next unless -d "$dir/raw";
-#    $sitename = $dir;
-#    @sitename = split( "/", $dir );
-#    $sitename =
-#      join( '.', ( $sitename[$#sitename], $sitename[ $#sitename - 1 ] ) );
+
+    if (!$sitename) {
+        $sitename = $dir;
+        @sitename = split( "/", $dir );
+        $sitename =
+          join( '.', ( $sitename[$#sitename], $sitename[ $#sitename - 1 ] ) );
+    }
 
     chdir "$dir/raw" or die "Cant chdir";
 
@@ -64,8 +67,7 @@
 
     for $log (@logs) {
         $cmd =
-"$webalizer $quiet -p -n $servername  -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.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- ispman.makelogs	9 Oct 2005 18:39:41 -0000	1.27
+++ ispman.makelogs	10 Oct 2005 20:18:23 -0000	1.28
@@ -267,8 +267,7 @@
     if ( -e $webalizer ) {
         print "  Building report for $servername\n";
         my $cmd =
-"perl  $FindBin::Bin/ispman.loganalyzer $quit -c $webalizer -h $servername -d $vhostDirectory";
-
+"perl $FindBin::Bin/ispman.loganalyzer $quiet -c $webalizer -h $servername $vhostDirectory";
         system($cmd);
     }
 }
@@ -279,7 +278,7 @@
 #		open (HTACCESS, ">${htaccessFile}") || die "Cannot open $htaccessFile for writing";
 #		print HTACCESS <<"EOF";
 #AuthType Basic
-#AuthName "Statistiken f?r $domain"
+#AuthName "Statistics for $domain"
 #LDAP_Server \"$authBindHost\"
 #Bind_DN \"$authBindRootDN\"
 #Bind_Pass \"$authBindRootPass\"



-------------------------------------------------------
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.