From d9871444b4e36ab4474fd61d0736ba864254a136 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Thu, 29 Mar 2012 12:09:01 +0200 Subject: [PATCH] various fix in awstats-dir --- root/etc/e-smith/events/actions/awstats-dir | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/root/etc/e-smith/events/actions/awstats-dir b/root/etc/e-smith/events/actions/awstats-dir index 42de48d..baa3d39 100644 --- a/root/etc/e-smith/events/actions/awstats-dir +++ b/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"; } } }