fix awstats-update script

This commit is contained in:
Daniel Berteaud 2012-03-29 14:04:02 +02:00
parent ff3dce9dd7
commit 1349423891
2 changed files with 3 additions and 2 deletions

View File

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

View File

@ -1,6 +1,7 @@
#!/usr/bin/perl -w
use esmith::DomainsDB;
use esmith::templates;
use File::Path qw/rmtree/;
my $event = $ARGV [0];
@ -22,7 +23,7 @@ foreach my $dom (@domains){
my $name = $dom->key;
if (($event eq 'domain-delete') ){
rmtree "/home/e-smith/files/stats/$name";
unlink <"/etc/awstats/$awstats.$domain.conf">;
unlink <"/etc/awstats/awstats.$domain.conf">;
}
else{
my $stats = $dom->prop('Stats') || 'disabled';