2009-09-28 13:00:49 +02:00
|
|
|
#!/sbin/runscript
|
|
|
|
|
|
|
|
opts="depend start stop reload"
|
|
|
|
|
|
|
|
depend() {
|
|
|
|
need net
|
|
|
|
}
|
|
|
|
|
|
|
|
start() {
|
|
|
|
ebegin "Starting PHP FastCGI server"
|
|
|
|
start-stop-daemon --start --pidfile=/var/run/php-fpm.pid \
|
2010-02-16 16:00:28 +01:00
|
|
|
--exec /usr/bin/php-fpm
|
2009-09-28 13:00:49 +02:00
|
|
|
eend $?
|
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
|
|
|
ebegin "Stopping PHP FastCGI server"
|
|
|
|
start-stop-daemon --stop --pidfile=/var/run/php-fpm.pid
|
|
|
|
eend $?
|
|
|
|
}
|
|
|
|
|
|
|
|
reload() {
|
|
|
|
ebegin "Restart gracefully PHP FastCGI server"
|
|
|
|
kill -SIGUSR2 `cat /var/run/php-fpm.pid` &>/dev/null
|
|
|
|
eend $?
|
|
|
|
}
|