various fixes

tags/0.1.0
Daniel Berteaud 13 years ago
parent 1349423891
commit 724e8bdf61
  1. 2
      ipasserelle-stats.spec
  2. 2
      root/etc/e-smith/templates/etc/awstats/domain.conf/010Log
  3. 30
      root/etc/e-smith/templates/etc/awstats/domain.conf/040Report
  4. 4
      root/etc/e-smith/templates/etc/cron.hourly/awstats/10All

@ -1,5 +1,5 @@
%define version 0.0.1 %define version 0.0.1
%define release 1.beta2 %define release 1.beta3
%define name ipasserelle-stats %define name ipasserelle-stats

@ -1,4 +1,4 @@
LogFile="/var/log/httpd/access_log" LogFile="/var/log/httpd/access_log"
LogType=W LogType=W
LogFormat=1 LogFormat="%virtualname %host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot"
LogSeparator=" " LogSeparator=" "

@ -0,0 +1,30 @@
ShowSummary=UVPHB
ShowMonthStats=UVPHB
ShowDaysOfMonthStats=VPHB
ShowDaysOfWeekStats=PHB
ShowHoursStats=PHB
ShowDomainsStats=PHB
ShowHostsStats=PHBL
ShowAuthenticatedUsers=0
ShowRobotsStats=HBL
ShowWormsStats=0
ShowEMailSenders=0
ShowEMailReceivers=0
ShowSessionsStats=1
ShowPagesStats=PBEX
ShowFileTypesStats=HB
ShowFileSizesStats=0
ShowOSStats=1
ShowBrowsersStats=1
ShowScreenSizeStats=0
ShowOriginStats=PH
ShowKeyphrasesStats=1
ShowKeywordsStats=1
ShowMiscStats=a
ShowHTTPErrorsStats=1
ShowSMTPErrorsStats=0
ShowClusterStats=0
AddDataArrayMonthStats=1
AddDataArrayShowDaysOfMonthStats=1
AddDataArrayShowDaysOfWeekStats=1
AddDataArrayShowHoursStats=1

@ -1,12 +1,14 @@
{ {
use esmith::DomainsDB; use esmith::DomainsDB;
my $d = esmith::DomainsDB->open_ro or die "Couldn't open DomainsDB\n"; my $d = esmith::DomainsDB->open_ro or die "Couldn't open DomainsDB\n";
my $year = `date +%Y`;
foreach my $dom ($d->domains){ foreach my $dom ($d->domains){
my $stats = $dom->prop('Stats') || 'disabled'; my $stats = $dom->prop('Stats') || 'disabled';
next if ($stats ne 'enabled'); next if ($stats ne 'enabled');
my $name = $dom->key; my $name = $dom->key;
my $lang = $awstats{'Language'} || 'fr'; my $lang = $awstats{'Language'} || 'fr';
$OUT .= "/usr/share/awstats/tools/awstats_buildstaticpages.pl -config=$name -update -lang=$lang -dir=/home/e-smith/files/stats/$name\n"; mkdir "/home/e-smith/files/stats/$name/$year/" if (!-d "/home/e-smith/files/stats/$name/$year/");
$OUT .= "/usr/share/awstats/tools/awstats_buildstaticpages.pl -config=$name -update -lang=$lang -dir=/home/e-smith/files/stats/$name/$year/\n";
} }
} }

Loading…
Cancel
Save