parent
724e8bdf61
commit
ec9b19134f
2 changed files with 5 additions and 5 deletions
@ -1,14 +1,14 @@ |
||||
{ |
||||
use esmith::DomainsDB; |
||||
my $d = esmith::DomainsDB->open_ro or die "Couldn't open DomainsDB\n"; |
||||
my $year = `date +%Y`; |
||||
my $lang = $awstats{'Language'} || 'fr'; |
||||
$OUT .= 'YEAR=$(date +%Y)'."\n"; |
||||
|
||||
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'; |
||||
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"; |
||||
$OUT .= 'mkdir -p /home/e-smith/files/stats/'."$name".'/$YEAR/'."\n"; |
||||
$OUT .= "/usr/share/awstats/tools/awstats_buildstaticpages.pl -config=$name -update -lang=$lang -dir=/home/e-smith/files/stats/$name/\$YEAR/\n\n"; |
||||
} |
||||
} |
||||
|
Loading…
Reference in new issue