]> git.pld-linux.org Git - packages/php.git/commitdiff
get pidfile path from config
authorElan Ruusamäe <glen@delfi.ee>
Sun, 26 Aug 2012 11:46:15 +0000 (14:46 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Sun, 26 Aug 2012 11:50:01 +0000 (14:50 +0300)
Conflicts:
php-fpm.init

php-fpm.init

index f7c4fa606884920bd18871a6ebc8f38884553778..b44f905e4bcab06df5f81de15962f1aff7fcf997 100644 (file)
 # 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?
@@ -28,7 +30,7 @@ start() {
        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
 }
@@ -95,7 +97,7 @@ case "$1" in
        reload USR1 0
        ;;
   status)
-       status @processname@
+       status  --pidfile $pidfile @processname@
        RETVAL=$?
        ;;
   *)
This page took 0.361986 seconds and 4 git commands to generate.