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