X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=etc%2Fsv%2Fphp5-fpm%2Fconfigure.sh;h=25187a79fb6b730516a530e56437aa706fe6c52a;hb=7162111397558c874a76b510aa16954dfc566a37;hp=1d40c7cc50e8a12bf23518f2117b8a1f9d9d1e86;hpb=f1ea1df6ff4652bb89b232cb5fd5762c6fea4dcf;p=lhc%2Fateliers.git diff --git a/etc/sv/php5-fpm/configure.sh b/etc/sv/php5-fpm/configure.sh index 1d40c7c..25187a7 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 php5-mysql php5-gd rule insserv_remove php5-fpm -rule www_configure +rule _www_configure rule adduser php5 \ --disabled-login \ @@ -29,10 +29,12 @@ sudo install -m 440 -o php5 -g php5 \ sudo install -m 664 -o php5 -g php5 \ "$tool"/etc/php5/fpm/php.ini \ /etc/php5/fpm/php.ini -for conf in $(find "$tool"/etc/php5/fpm/conf.d \ - -mindepth 1 -maxdepth 1 -type f \ - -name '*.conf' \ - -printf '%f\n' || true) +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" \ @@ -43,7 +45,7 @@ for pool in $(find "$tool"/etc/php5/fpm/pool.d/ \ -false ${@:+$(printf -- '-or -name %s.conf\n' "$@")} \ -printf '%f\n') do pool=${pool%\.conf} - rule adduser "$pool"__php5 \ + rule adduser php5_"$pool" \ --disabled-login \ --disabled-password \ --group \ @@ -74,7 +76,7 @@ for pool in $(find "$tool"/etc/php5/fpm/pool.d/ \ env[TEMP] = /tmp env[TMPDIR] = /tmp env[TMP] = /tmp - group = ${pool}__php5 + group = php5_$pool #listen = 127.0.0.1:9000 listen = /run/php5/fpm/$pool #listen.allowed_clients = 127.0.0.1 @@ -94,7 +96,7 @@ for pool in $(find "$tool"/etc/php5/fpm/pool.d/ \ rlimit_core = unlimited rlimit_files = 131072 slowlog = /home/www/log/php5/fpm/$pool/slow.log - user = ${pool}__php5 - $(cat "$tool"/etc/php5/fpm/pool.d/"$conf") + user = php5_$pool + $(cat "$tool"/etc/php5/fpm/pool.d/"$pool".conf) EOF done