#
# processname: @processname@
# config: /etc/php/fpm.conf
-# pidfile: /var/run/php/@processname@.pid
+# pidfile: /var/run/@processname@.pid
#
# Source function library
# Get network config
. /etc/sysconfig/network
-pidfile=/var/run/php/@processname@.pid
+configfile=/etc/php/fpm.conf
lockfile=/var/lock/subsys/@processname@
+pidfile=$(sed -ne 's,.*"\?pid_file"\?>\([^<]\+\)<.*,\1,p' $configfile)
+pidfile=${pidfile:-/var/run/@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/fpm.conf
+ daemon --pidfile $pidfile /usr/sbin/@processname@ --fpm --fpm-config $configfile
RETVAL=$?
[ $RETVAL -eq 0 ] && touch $lockfile
}
reload USR1 0
;;
status)
- status @processname@
+ status --pidfile $pidfile @processname@
RETVAL=$?
;;
*)