alpha-quadrant/dev-lang/php/files/php-fpm.init

27 lines
554 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-cgi -- --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 $?
}