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