# Get network config
. /etc/sysconfig/network
-pidfile=/var/run/php/@processname@.pid
+configfile=/etc/php/php-fpm.conf
lockfile=/var/lock/subsys/@processname@
+pidfile=$(sed -ne 's,^pid\s*=\s*\(.*\),\1,p' $configfile)
+pidfile=${pidfile:-/var/run/php/@processname@.pid}
start() {
# Check if the service is already running?
fi
msg_starting "PHP FastCGI Process Manager (@processname@)"
- daemon --pidfile $pidfile /usr/sbin/@processname@ --fpm-config /etc/php/php-fpm.conf
+ daemon --pidfile $pidfile /usr/sbin/@processname@ --fpm-config $configfile
RETVAL=$?
[ $RETVAL -eq 0 ] && touch $lockfile
}
reload USR1 0
;;
status)
- status @processname@
+ status --pidfile $pidfile @processname@
RETVAL=$?
;;
*)