sbin runscript Copyright 1999-2004 Gentoo Foundation Distributed under

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend() {
need nginx mysql
}
start() {
ebegin "Starting PHP FastCGI"
start-stop-daemon --start \
--env PHP_FCGI_CHILDREN=5 \
--env PHP_FCGI_MAX_REQUESTS=0 \
--chuid php:php \
--background --make-pidfile \
--pidfile /var/run/php-fastcgi.pid \
--exec /usr/bin/php-cgi -- \
-q -b 127.0.0.1:8888
eend $?
}
stop() {
ebegin "Stopping PHP FastCGI"
start-stop-daemon --stop \
--user php:php \
--pidfile /var/run/php-fastcgi.pid \
--exec /usr/bin/php-cgi
eend $?
}