fix awstats-update script

tags/0.1.0
Daniel Berteaud 13 years ago
parent ff3dce9dd7
commit 1349423891
  1. 2
      ipasserelle-stats.spec
  2. 3
      root/etc/e-smith/events/actions/awstats-update

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

@ -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';

Loading…
Cancel
Save