diff --git a/ipasserelle-stats.spec b/ipasserelle-stats.spec index db03d76..dae81df 100644 --- a/ipasserelle-stats.spec +++ b/ipasserelle-stats.spec @@ -1,5 +1,5 @@ %define version 0.0.1 -%define release 1.beta2 +%define release 1.beta3 %define name ipasserelle-stats diff --git a/root/etc/e-smith/templates/etc/awstats/domain.conf/010Log b/root/etc/e-smith/templates/etc/awstats/domain.conf/010Log index e18619b..b69003a 100644 --- a/root/etc/e-smith/templates/etc/awstats/domain.conf/010Log +++ b/root/etc/e-smith/templates/etc/awstats/domain.conf/010Log @@ -1,4 +1,4 @@ LogFile="/var/log/httpd/access_log" LogType=W -LogFormat=1 +LogFormat="%virtualname %host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot" LogSeparator=" " diff --git a/root/etc/e-smith/templates/etc/awstats/domain.conf/040Report b/root/etc/e-smith/templates/etc/awstats/domain.conf/040Report new file mode 100644 index 0000000..01404eb --- /dev/null +++ b/root/etc/e-smith/templates/etc/awstats/domain.conf/040Report @@ -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 diff --git a/root/etc/e-smith/templates/etc/cron.hourly/awstats/10All b/root/etc/e-smith/templates/etc/cron.hourly/awstats/10All index 5efd2e0..a006551 100644 --- a/root/etc/e-smith/templates/etc/cron.hourly/awstats/10All +++ b/root/etc/e-smith/templates/etc/cron.hourly/awstats/10All @@ -1,12 +1,14 @@ { use esmith::DomainsDB; my $d = esmith::DomainsDB->open_ro or die "Couldn't open DomainsDB\n"; +my $year = `date +%Y`; foreach my $dom ($d->domains){ my $stats = $dom->prop('Stats') || 'disabled'; next if ($stats ne 'enabled'); my $name = $dom->key; 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"; } }