27 lines
545 B
Plaintext
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 $?
|
|
}
|