aboutsummaryrefslogtreecommitdiffstats
path: root/main/php5/php-fpm.initd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2016-05-05 08:20:14 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2016-05-05 15:43:07 +0000
commit1c0b0671f25cf919993b41569446a03170aa39ab (patch)
treed25723f06f595425601ab345b61cba2581ff3655 /main/php5/php-fpm.initd
parent72241eb60c26b15a0b417c249cd5eff5c66fb712 (diff)
downloadaports-1c0b0671f25cf919993b41569446a03170aa39ab.tar.bz2
aports-1c0b0671f25cf919993b41569446a03170aa39ab.tar.xz
main/php5: renamed php to php5
Diffstat (limited to 'main/php5/php-fpm.initd')
-rw-r--r--main/php5/php-fpm.initd27
1 files changed, 27 insertions, 0 deletions
diff --git a/main/php5/php-fpm.initd b/main/php5/php-fpm.initd
new file mode 100644
index 0000000000..814c2bb264
--- /dev/null
+++ b/main/php5/php-fpm.initd
@@ -0,0 +1,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 $?
+}