aboutsummaryrefslogtreecommitdiffstats
path: root/main/php/php-fpm.initd
blob: 814c2bb264c0ddf248d348bb0b36289948c6b735 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/sbin/openrc-run

name="PHP FastCGI Process Manager"
cfgfile="/etc/php/php-fpm.conf"
pidfile="/var/run/php-fpm.pid"
command="/usr/bin/php-fpm"
command_args="--fpm-config $cfgfile --pid $pidfile"
required_files="$cfgfile"

extra_started_commands="reload"

depend() {
	need net
	use apache2 lighttpd nginx
}

start_pre() {
	ebegin
	$command $command_args -t 2>/dev/null
	eend $?
}

reload() {
	ebegin "Reloading $name"
	start-stop-daemon --signal USR2 --pidfile ${pidfile} --name ${SVCNAME}
	eend $?
}