-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}
+for pool in $(
+ find "$tool"/etc/php5/fpm/pool.d/ \
+ -mindepth 2 -maxdepth 2 -type f \
+ -name "php-fpm.conf" \
+ -printf '%P\n')
+ do pool=${pool%\/php-fpm\.conf}