From 4fb3c8ed11196e0b6c254c8d984bf7e4f3987f19 Mon Sep 17 00:00:00 2001 From: Carlo Landmeter Date: Sat, 27 Aug 2016 16:07:08 +0000 Subject: testing/php7: move to community --- community/php7/php7-fpm.initd | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 community/php7/php7-fpm.initd (limited to 'community/php7/php7-fpm.initd') diff --git a/community/php7/php7-fpm.initd b/community/php7/php7-fpm.initd new file mode 100644 index 0000000000..1016c68f0d --- /dev/null +++ b/community/php7/php7-fpm.initd @@ -0,0 +1,35 @@ +#!/sbin/openrc-run + +name="PHP7 FastCGI Process Manager" +cfgfile="/etc/php7/php-fpm.conf" +pidfile="/var/run/php-fpm7.pid" +command="/usr/sbin/php-fpm7" +command_args="--fpm-config $cfgfile --pid $pidfile" +required_files="$cfgfile" + +extra_started_commands="reload reopen" +description_reload="Reload configuration" +description_reopen="Reopen log files" + +depend() { + need net + before apache2 lighttpd nginx +} + +start_pre() { + ebegin + $command $command_args -t 2>/dev/null + eend $? +} + +reload() { + ebegin "Reloading ${SVCNAME} configuration" + start-stop-daemon --signal USR2 --pidfile $pidfile + eend $? +} + +reopen() { + ebegin Reopening ${SVCNAME} log files"" + start-stop-daemon --signal USR1 --pidfile $pidfile + eend $? +} -- cgit v1.2.3