From 33097154a7736d41fe8672c3967e4928ba2424d1 Mon Sep 17 00:00:00 2001 From: tz Date: Fri, 20 Sep 2019 12:21:11 +0000 Subject: Welcome PHP 7.4 RC 1 in the ports-tree. There are many greater changes including: - New module ffi - Remove interbase module - Remove recode module - Remove wddx module - Many modules changes the build switches - Many modules changes the config format, so patches needed to be recreated Special thanks to tobik and ale for their support. Reviewed by: tobik, ale, joneum Sponsored by: PHP Update Service Differential Revision: https://reviews.freebsd.org/D21349 --- lang/php74/files/php-fpm.in | 69 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 lang/php74/files/php-fpm.in (limited to 'lang/php74/files/php-fpm.in') diff --git a/lang/php74/files/php-fpm.in b/lang/php74/files/php-fpm.in new file mode 100644 index 000000000000..1c9d7f5c81ba --- /dev/null +++ b/lang/php74/files/php-fpm.in @@ -0,0 +1,69 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: php-fpm +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# +# Add the following line to /etc/rc.conf to enable php-fpm: +# php_fpm_enable="YES" +# + +. /etc/rc.subr + +name="php_fpm" +rcvar=php_fpm_enable + +start_precmd="php_fpm_prestart" +restart_precmd="php_fpm_checkconfig" +reload_precmd="php_fpm_checkconfig" +configtest_cmd="php_fpm_checkconfig" + +load_rc_config "$name" + +: ${php_fpm_enable="NO"} +: ${php_fpm_umask=""} + +extra_commands="reload configtest logrotate" + +command="%%PREFIX%%/sbin/php-fpm" +pidfile="/var/run/php-fpm.pid" +sig_stop="QUIT" +sig_reload="USR2" +logrotate_cmd="php_fpm_logrotate" + +required_files="%%PREFIX%%/etc/php-fpm.conf" + +php_fpm_logrotate() { + if [ -z "$rc_pid" ]; then + _run_rc_notrunning + return 1 + fi + echo "Rotating logs $name." + kill -USR1 $rc_pid +} + +php_fpm_checkconfig() +{ + echo "Performing sanity check on php-fpm configuration:" + eval ${command} -t +} + +php_fpm_prestart() +{ + php_fpm_checkconfig + checkconfig=$? + if [ $checkconfig -ne 0 ]; then + return $checkconfig + fi + + if [ ! -z "$php_fpm_umask" ]; then + echo "Setting umask to: ${php_fpm_umask}" + umask $php_fpm_umask + fi +} + +run_rc_command "$1" -- cgit