commit bfee7dc5f005122a5356337a70e3f513ebbd0012
Author: Elan Ruusamäe <[email protected]>
Date: Sun Aug 26 14:46:15 2012 +0300
get pidfile path from config
php-fpm.init | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/php-fpm.init b/php-fpm.init
index 5da5db0..3006f7e 100644
--- a/php-fpm.init
+++ b/php-fpm.init
@@ -17,8 +17,10 @@
# Get network config
. /etc/sysconfig/network
-pidfile=/var/run/php/@[email protected]
+configfile=/etc/php/fpm.conf
lockfile=/var/lock/subsys/@processname@
+pidfile=$(sed -ne 's,.*"\?pid_file"\?>\([^<]\+\)<.*,\1,p' $configfile)
+pidfile=${pidfile:-/var/run/php/@[email protected]}
start() {
# Check if the service is already running?
@@ -28,7 +30,7 @@ start() {
fi
msg_starting "PHP FastCGI Process Manager (@processname@)"
- daemon --pidfile $pidfile /usr/sbin/@processname@ --fpm --fpm-config
/etc/php/fpm.conf
+ daemon --pidfile $pidfile /usr/sbin/@processname@ --fpm --fpm-config
$configfile
RETVAL=$?
[ $RETVAL -eq 0 ] && touch $lockfile
}
@@ -95,7 +97,7 @@ case "$1" in
reload USR1 0
;;
status)
- status @processname@
+ status --pidfile $pidfile @processname@
RETVAL=$?
;;
*)
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit