alpha-quadrant/dev-lang/php/files/php-fpm.init
2010-02-16 16:00:28 +01:00

27 lines
545 B
Plaintext

#!/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 \
--exec /usr/bin/php-fpm
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 $?
}