ispman/bin ispman.makelogs,1.24.2.1,1.24.2.2 ispman.loganalyzer,1.9.2.1,1.9.2.2

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

Modified Files:
      Tag: rel_1_2-bugfixes
	ispman.makelogs ispman.loganalyzer 
Log Message:
fixes param inconsistencies
(thanks to TheSin)

Index: ispman.loganalyzer
===================================================================
RCS file: /cvsroot/ispman/ispman/bin/ispman.loganalyzer,v
retrieving revision 1.9.2.1
retrieving revision 1.9.2.2
diff -u -d -r1.9.2.1 -r1.9.2.2
--- ispman.loganalyzer	9 Oct 2005 18:33:00 -0000	1.9.2.1
+++ ispman.loganalyzer	10 Oct 2005 20:15:30 -0000	1.9.2.2
@@ -4,9 +4,9 @@
     unshift @INC,
       ( $FindBin::Bin, "$FindBin::Bin/../lib", "$FindBin::Bin/../conf" );
     use Getopt::Std;
-    getopt( 'cq', \%opts );
+    getopts( 'c:h:q', \%opts );
     unless ( $opts{'c'} && $ARGV[0] ) {
-        print "$0 [-q] -c /path/to/webalizer vhost_directory";
+        print "$0 [-q] [-h sitename] -c /path/to/webalizer vhost_directory";
         print "\n";
         exit;
     }
@@ -14,6 +14,7 @@
 
 @dir       = @ARGV;
 $webalizer = $opts{'c'};
+$sitename  = $opts{'h'};
 $quiet     = $opts{'q'};
 
 if ($quiet) {
@@ -38,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";
 
@@ -63,7 +67,7 @@
 
     for $log (@logs) {
         $cmd =
-"$webalizer $quiet -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.2.1
retrieving revision 1.24.2.2
diff -u -d -r1.24.2.1 -r1.24.2.2
--- ispman.makelogs	9 Oct 2005 18:33:00 -0000	1.24.2.1
+++ ispman.makelogs	10 Oct 2005 20:15:30 -0000	1.24.2.2
@@ -69,7 +69,7 @@
 "Webalizer command does not exists\nI will split the files but no reports will be generated.";
 }
 
-if ( $ispman->getConf("ispmanVhostsStyle") =~ /dir/m ) {
+if ( $ispman->getConf("apacheVhostsStyle") =~ /dir/m ) {
     print "Using one hash file per domain\n";
     my ( $domain, $domains );
 
@@ -267,7 +267,7 @@
     if ( -e $webalizer ) {
         print "  Building report for $servername\n";
         my $cmd =
-"perl  $FindBin::Bin/ispman.loganalyzer $quiet -c $webalizer -d $vhostDirectory";
+"perl $FindBin::Bin/ispman.loganalyzer $quiet -c $webalizer -h $servername $vhostDirectory";
         system($cmd);
     }
 }
@@ -278,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.