From fc4d59c64b6abbcb62d65e16a148ceaf9950fa60 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 12 Jul 2017 12:17:50 +0200 Subject: [PATCH] Fixes in php-pool-dirs action script --- root/etc/e-smith/events/actions/php-pool-dirs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/root/etc/e-smith/events/actions/php-pool-dirs b/root/etc/e-smith/events/actions/php-pool-dirs index efc31d8..f1284d6 100644 --- a/root/etc/e-smith/events/actions/php-pool-dirs +++ b/root/etc/e-smith/events/actions/php-pool-dirs @@ -18,17 +18,19 @@ die "$pool not found in the account database\n" unless $acc; my $dyn = $acc->prop('DynamicContent') || 'disabled'; -if ($acc =~ m/^enabled|on|1|yes$/ && $event ne 'share-delete'){ - make_path( qw( /var/log/php/$pool - /var/lib/php/$pool/session - /var/lib/php/$pool/wsdlcache - /var/lib/php/$pool/opcache - /var/lib/php/$pool/tmp ), { - chmode => 0770, +if ($dyn =~ m/^enabled|on|1|yes$/ && $event ne 'share-delete'){ + my @dirs = ( "/var/log/php/$pool", + "/var/lib/php/$pool/session", + "/var/lib/php/$pool/wsdlcache", + "/var/lib/php/$pool/opcache", + "/var/lib/php/$pool/tmp" ); + make_path( @dirs, { owner => 'root', group => 'www' }); + chmod 0770, @dirs; } else{ - remote_tree( qw(/var/log/php/$pool /var/lib/php/$pool/) ); + remove_tree( ( "/var/log/php/$pool", + " /var/lib/php/$pool/" ) ); }