X-Git-Url: http://git.cyclocoop.org/?p=lhc%2Fateliers.git;a=blobdiff_plain;f=etc%2Fsv%2Fphp5-fpm%2Fconfigure.sh;h=d349e1fa0e05526645dff2b9bd403ecf35ffa8b3;hp=5639822c192a04d79edb9d128920356b180c243c;hb=b27661cf8e40872543f86a00922d18573ef83612;hpb=7c02698fa11a13fd332c2e95986339241aaa79a6 diff --git a/etc/sv/php5-fpm/configure.sh b/etc/sv/php5-fpm/configure.sh index 5639822..d349e1f 100644 --- a/etc/sv/php5-fpm/configure.sh +++ b/etc/sv/php5-fpm/configure.sh @@ -20,28 +20,26 @@ rule adduser log-php5 \ sudo ln -fns \ /etc/php5/fpm \ /home/www/etc/php5 -sudo rm -rf \ - /etc/php5/fpm/conf.d \ - /etc/php5/fpm/pool.d sudo install -d -m 770 -o php5 -g php5 \ /etc/php5/fpm/conf.d \ /etc/php5/fpm/pool.d sudo install -m 440 -o php5 -g php5 \ "$tool"/etc/php5/fpm/php-fpm.conf \ /etc/php5/fpm/php-fpm.conf -local conf -#for conf in "$tool"/etc/php5/fpm/conf.d/*.conf -# do conf=${conf#"$tool"/etc/php5/fpm/conf.d/} -# sudo install -m 660 -o php5 -g php5 \ -# "$tool"/etc/php5/fpm/conf.d/"$conf" \ -# /etc/php5/fpm/conf.d/"$conf" -# done -for conf in "$tool"/etc/php5/fpm/pool.d/*.conf - do conf=${conf#"$tool"/etc/php5/fpm/pool.d/} - IFS=. read -r pool <<-EOF - ${conf%.conf} - EOF - assert 'test "${pool:+set}"' +for conf in $(find "$tool"/etc/php5/fpm/conf.d \ + -mindepth 1 -maxdepth 1 -type f \ + -name '*.conf' \ + -printf '%f\n' || true) + do + sudo install -m 660 -o php5 -g php5 \ + "$tool"/etc/php5/fpm/conf.d/"$conf" \ + /etc/php5/fpm/conf.d/"$conf" + done +for pool in $(find "$tool"/etc/php5/fpm/pool.d/ \ + -mindepth 1 -maxdepth 1 -type d \ + -false ${@:+$(printf -- '-or -name %s.conf\n' "$@")} \ + -printf '%f\n') + do pool=${pool%\.conf} rule adduser php5-"$pool" \ --disabled-login \ --disabled-password \