-start() {
- # Check if the service is already running?
- if [ ! -f /var/lock/subsys/php-fpm ]; then
- msg_starting "PHP FastCGI Process Manager"
- daemon --pidfile $pidfile /usr/sbin/php-fpm --fpm-config /etc/php/php-fpm.conf
+# configtest itself
+# must return non-zero if check failed
+# output is discarded if checkconfig is ran without details
+configtest() {
+ /usr/sbin/@processname@ --fpm-config $configfile -t
+ return $?
+}
+
+# wrapper for configtest
+checkconfig() {
+ local details=${1:-0}
+
+ if [ $details = 1 ]; then
+ # run config test and display report (status action)
+ show "Checking %s configuration" "PHP FastCGI Process Manager"; busy
+ local out
+ out=$(configtest 2>&1)