X-Git-Url: https://git.cyclocoop.org/?p=lhc%2Fateliers.git;a=blobdiff_plain;f=etc%2Fsv%2Fphp5-fpm%2Fconfigure.sh;h=1fdaa54697db976614527dcba63d9617fd8023e6;hp=44d548975d140bc673c8b5bca12381e3cbaf9cc1;hb=eefc410c23df14d9e47bfc1eedcfb500d557c5a8;hpb=45a4450db64a63643edd37d8e3aba8d57fe6a3ad diff --git a/etc/sv/php5-fpm/configure.sh b/etc/sv/php5-fpm/configure.sh index 44d5489..1fdaa54 100644 --- a/etc/sv/php5-fpm/configure.sh +++ b/etc/sv/php5-fpm/configure.sh @@ -1,7 +1,7 @@ -rule apt_get_install php5-fpm php-apc +rule apt_get_install php5-fpm php-apc php5-mysql php5-gd rule insserv_remove php5-fpm -rule www_configure +rule _www_configure rule adduser php5 \ --disabled-login \ @@ -26,10 +26,15 @@ sudo install -d -m 770 -o php5 -g php5 \ sudo install -m 440 -o php5 -g php5 \ "$tool"/etc/php5/fpm/php-fpm.conf \ /etc/php5/fpm/php-fpm.conf -for conf in $(find "$tool"/etc/php5/fpm/conf.d \ - -mindepth 1 -maxdepth 1 -type f \ - -name '*.conf' \ - -printf '%f\n' || true) +sudo install -m 664 -o php5 -g php5 \ + "$tool"/etc/php5/fpm/php.ini \ + /etc/php5/fpm/php.ini +for conf in $( + test ! -d "$tool"/etc/php5/fpm/conf.d || + find "$tool"/etc/php5/fpm/conf.d \ + -mindepth 1 -maxdepth 1 -type f \ + -name '*.conf' \ + -printf '%f\n') do sudo install -m 660 -o php5 -g php5 \ "$tool"/etc/php5/fpm/conf.d/"$conf" \ @@ -92,9 +97,6 @@ for pool in $(find "$tool"/etc/php5/fpm/pool.d/ \ rlimit_files = 131072 slowlog = /home/www/log/php5/fpm/$pool/slow.log user = ${pool}__php5 - $(cat "$tool"/etc/php5/fpm/pool.d/"$conf") + $(cat "$tool"/etc/php5/fpm/pool.d/"$pool".conf) EOF - sudo install -m 664 -o php5 -g php5 \ - "$tool"/etc/php5/fpm/php.ini \ - /etc/php5/fpm/php.ini done