various fix in awstats-dir

tags/0.1.0
Daniel Berteaud 13 years ago
parent 02b97137d1
commit d9871444b4
  1. 12
      root/etc/e-smith/events/actions/awstats-dir

@ -15,21 +15,21 @@ if (defined $domain){
@domains = $d->get($domain);
}
else{
@doains = ($d->domains);
@domains = ($d->domains);
}
foreach my $dom (@domains){
my $name = $dom->key;
if (($event eq 'domain-delete') ){
rmtree "/home/e-smith/files/stats/$domain";
rmtree "/home/e-smith/files/stats/$name";
}
else{
my $stats = $dom->prop('Stats') || 'disabled';
if (($stats eq 'enabled') && (!-d "/home/e-smith/files/stats/$domain")){
mkdir "/home/e-smith/files/stats/$domain", 0755;
if (($stats eq 'enabled') && (!-d "/home/e-smith/files/stats/$name")){
mkdir "/home/e-smith/files/stats/$name", 0755;
}
elsif (($stats ne 'enabled') && (-d "/home/e-smith/files/stats/$domain")){
rmtree "/home/e-smith/files/stats/$domain";
elsif (($stats ne 'enabled') && (-d "/home/e-smith/files/stats/$name")){
rmtree "/home/e-smith/files/stats/$name";
}
}
}

Loading…
Cancel
Save