summaryrefslogtreecommitdiffstats
path: root/dev-lang/php/files/php-fpm.init
blob: adcfd3275bbba699374a42cfb62a5e3ace2da044 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/sbin/runscript

PHP_FPM_CONF="/etc/php/fpm-php5/php-fpm.conf"

opts="depend start stop reload"

depend() {
	need net
	use apache2 lighttpd nginx
}

start() {
	ebegin "Starting PHP FastCGI server"
	start-stop-daemon --start --exec /usr/bin/php-fpm -- -y "${PHP_FPM_CONF}"
	eend $?
}

stop() {
	ebegin "Stopping PHP FastCGI server"
	start-stop-daemon --stop --name php-fpm
	eend $?
}