if php-fpm starts but fails to bind tcp port (for example because its already in use by some other daemon), init script reports success but actually daemon terminates. probably there some other cases which may lead to the same situation. I'd suggest to add --wait param to start-stop-deamon line, but its baselayout-2 dependent, so decice yourself Reproducible: Always Steps to Reproduce:
php-fpm? Which package is that? Is it on portage?
sorry, i fixed description
I think maybe configuring fpm to create a pid file by default and using that as a way to see if fpm started may be a better way.
We now create the pidfile in /var/run/php-fpm.pid and check for it with a timeout of 5 secs. Thanks Ole for the init.d file, I just uncommented the pidfile config.