php-fcgi: update to 5.5.22, improved rc script
This commit is contained in:
parent
405c1009fc
commit
a2b74ffba2
@ -1,2 +1,2 @@
|
||||
79664ce44f7c93f355a25a3fe3dcc91b php-5.5.21.tar.xz
|
||||
6297748058441ee6c6b88e429ee54ba1 php-fcgi
|
||||
fb1704131d495f5b3e6ab3b087a8dbe6 php-5.5.22.tar.xz
|
||||
94a2d91ea488161f10b097db3a4623fd php-fcgi
|
||||
|
@ -4,7 +4,7 @@
|
||||
# Depends on: xz libpcre libxml2
|
||||
|
||||
name=php-fcgi
|
||||
version=5.5.21
|
||||
version=5.5.22
|
||||
release=1
|
||||
source=(http://php.net/distributions/php-$version.tar.xz
|
||||
php-fcgi)
|
||||
|
@ -3,27 +3,38 @@
|
||||
# /etc/rc.d/php-fcgi: start/stop FastCGI php daemon
|
||||
#
|
||||
|
||||
PHP=/usr/bin/php-cgi
|
||||
SSD=/sbin/start-stop-daemon
|
||||
PROG=/usr/bin/php-cgi
|
||||
PID=/var/run/php-fcgi.pid
|
||||
PORT="127.0.0.1:8000"
|
||||
#PORT="/tmp/php_fcgi.sock"
|
||||
OPTS="-b $PORT"
|
||||
USR=www
|
||||
COUNT=8
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
export PHP_FCGI_CHILDREN=$COUNT
|
||||
su -s "/bin/sh" $USR -c "$PHP -b $PORT" &
|
||||
$SSD --start -bm --chuid $USR --pidfile $PID --exec $PROG -- $OPTS
|
||||
;;
|
||||
stop)
|
||||
killall -q $PHP
|
||||
$SSD --stop --remove-pidfile --retry 10 --pidfile $PID
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 2
|
||||
$0 start
|
||||
;;
|
||||
status)
|
||||
$SSD --status --pidfile $PID
|
||||
case $? in
|
||||
0) echo "$PROG is running" ;;
|
||||
1) echo "$PROG is not running but the pid file $PID exists" ;;
|
||||
3) echo "$PROG is not running" ;;
|
||||
4) echo "Unable to determine the program status" ;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 [start|stop|restart]"
|
||||
echo "usage: $0 [start|stop|restart|reload|status]"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user