[vhffs-dev] [419] Added the path to awstats sample file in the vhffs.conf

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 419
Author:   gradator
Date:     2007-01-21 11:32:40 +0000 (Sun, 21 Jan 2007)

Log Message:
-----------
Added the path to awstats sample file in the vhffs.conf

Modified Paths:
--------------
    trunk/vhffs-backend/conf/vhffs.conf
    trunk/vhffs-robots/src/generate_webstats.pl


Modified: trunk/vhffs-backend/conf/vhffs.conf
===================================================================
--- trunk/vhffs-backend/conf/vhffs.conf	2007-01-21 09:32:50 UTC (rev 418)
+++ trunk/vhffs-backend/conf/vhffs.conf	2007-01-21 11:32:40 UTC (rev 419)
@@ -203,8 +203,11 @@
 		log_parsed_rotation = 7
 		log_parsed_compress = yes		
 
+		# Where to find the awstat sampe file ?
+		log_awstats_sample = /usr/lib/vhffs/bots/misc/awstats.sample
+
 		# Where to find awstat (caution, you must apply the vhffs patch on)
-		log_awstat = /var/www/stats/awstats.pl
+		log_awstats = /var/www/stats/awstats.pl
 
 		# Is apache running locally or not ? (If not you should use the ugly remote restart of apaches over nfs)
 		log_apachelocal = yes

Modified: trunk/vhffs-robots/src/generate_webstats.pl
===================================================================
--- trunk/vhffs-robots/src/generate_webstats.pl	2007-01-21 09:32:50 UTC (rev 418)
+++ trunk/vhffs-robots/src/generate_webstats.pl	2007-01-21 11:32:40 UTC (rev 419)
@@ -57,15 +57,15 @@
 my $log_parsed_root = $webconf->{"log_parsed_root"};
 my $log_parsed_rotation = $webconf->{"log_parsed_rotation"};
 my $log_parsed_compress = ( $webconf->{"log_parsed_compress"} eq 'yes' ) ? 1 : 0;
-my $log_awstat = $webconf->{"log_awstat"};
+my $log_awstats = $webconf->{"log_awstats"};
+my $awstats_sample = $webconf->{"log_awstats_sample"};
 my $log_apachelocal = ( $webconf->{"log_apachelocal"} eq 'yes' ) ? 1 : 0;
 my $log_apachectl = $webconf->{"log_apachectl"};
-my $awstat_sample = "/usr/lib/vhffs/bots/misc/awstats.sample";
 
 die "ERROR: ".$log_incoming_root." is not a directory" if( ! -d $log_incoming_root );
 die "ERROR: ".$log_parsed_root." is not a directory" if( ! -d $log_parsed_root );
-die "ERROR: ".$log_awstat." does no exist" if( ! -f $log_awstat );
-die "ERROR: cannot find the awstat sample at ".$awstat_sample if( ! -f $awstat_sample );
+die "ERROR: ".$log_awstats." does no exist" if( ! -f $log_awstats );
+die "ERROR: cannot find the awstat sample at ".$awstats_sample if( ! -f $awstats_sample );
 die "ERROR: cannot find the apache2ctl binary at ".$log_apachectl if( $log_apachelocal  &&  ! -f $log_apachectl );
 
 my %websites;
@@ -188,7 +188,7 @@
 	Vhffs::Functions::create_dir($datadir) if ( ! -d $datadir );
 
 	# Create the config file
-	open( AWFILEIN , "< ".$awstat_sample );
+	open( AWFILEIN , "< ".$awstats_sample );
 	open( AWFILEOUT , "> ".$conffile );
 
 	while( $line = <AWFILEIN> )
@@ -204,7 +204,7 @@
 	close( AWFILEIN );
 
 	# Generate statistics
-	$cmd = $log_awstat." -config=".$svname." -update 2>/dev/null 1>/dev/null";
+	$cmd = $log_awstats." -config=".$svname." -update 2>/dev/null 1>/dev/null";
 	system( $cmd );
 
 	# Rotate logs for this website


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/