mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-18 19:49:40 +00:00
lang/php81: Moved man to share/man
- Add profile support in php-fpm rc script for running multiple php master process
This commit is contained in:
parent
944b46a328
commit
e8d69259d8
@ -1,6 +1,6 @@
|
||||
PORTNAME= php81
|
||||
DISTVERSION= 8.1.27
|
||||
PORTREVISION?= 0
|
||||
PORTREVISION?= 1
|
||||
CATEGORIES?= lang devel www
|
||||
MASTER_SITES= PHP/distributions
|
||||
DISTNAME= php-${DISTVERSION}
|
||||
@ -25,6 +25,7 @@ LIB_DEPENDS= libargon2.so:security/libargon2 \
|
||||
libpcre2-8.so:devel/pcre2
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
GNU_CONFIGURE_MANPREFIX=${PREFIX}/share
|
||||
CONFIGURE_ARGS+= --disable-all \
|
||||
--program-prefix="" \
|
||||
--with-config-file-scan-dir=${PREFIX}/etc/php \
|
||||
|
@ -6,8 +6,13 @@
|
||||
|
||||
#
|
||||
# Add the following line to /etc/rc.conf to enable php-fpm:
|
||||
# php_fpm_enable="YES"
|
||||
#
|
||||
# php-fpm_enable (bool): Set to "NO" by default.
|
||||
# Set it to "YES" to enable nginx
|
||||
# php-fpm_profiles (str): Set to "" by default.
|
||||
# Define your profiles here.
|
||||
# php_fpm_pid_prefix (str): Set to "" by default.
|
||||
# When using profiles manually assign value to "php_fpm_"
|
||||
# for prevent collision with other PIDs names.
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
@ -17,23 +22,53 @@ rcvar=php_fpm_enable
|
||||
start_precmd="php_fpm_prestart"
|
||||
restart_precmd="php_fpm_checkconfig"
|
||||
reload_precmd="php_fpm_checkconfig"
|
||||
command="%%PREFIX%%/sbin/php-fpm"
|
||||
configtest_cmd="php_fpm_checkconfig"
|
||||
_pidprefix="/var/run"
|
||||
pidfile="${_pidprefix}/php-fpm.pid"
|
||||
required_files="%%PREFIX%%/etc/php-fpm.conf"
|
||||
|
||||
load_rc_config "$name"
|
||||
load_rc_config "${name}"
|
||||
|
||||
: ${php_fpm_enable="NO"}
|
||||
: ${php_fpm_umask=""}
|
||||
|
||||
extra_commands="reload configtest logrotate"
|
||||
if [ -n "$2" ]; then
|
||||
profile="$2"
|
||||
if [ "x${php_fpm_profiles}" != "x" ]; then
|
||||
pidfile="${_pidprefix}/${php_fpm_pid_prefix}php-fpm-${profile}.pid"
|
||||
eval php_fpm_configfile="\${php_fpm_${profile}_configfile:-}"
|
||||
if [ "x${php_fpm_configfile}" = "x" ]; then
|
||||
echo "You must define a configuration file (php_fpm_${profile}_configfile)"
|
||||
exit 1
|
||||
fi
|
||||
required_files="${php_fpm_configfile}"
|
||||
eval php_fpm_enable="\${php_fpm_${profile}_enable:-${php_fpm_enable}}"
|
||||
php_fpm_flags="-y ${php_fpm_configfile} -g ${pidfile}"
|
||||
else
|
||||
echo "$0: extra argument ignored"
|
||||
fi
|
||||
else
|
||||
if [ "x${php_fpm_profiles}" != "x" -a "x$1" != "x" ]; then
|
||||
for profile in ${php_fpm_profiles}; do
|
||||
echo "===> php_fpm profile: ${profile}"
|
||||
/usr/local/etc/rc.d/php-fpm $1 ${profile}
|
||||
retcode="$?"
|
||||
if [ "0${retcode}" -ne 0 ]; then
|
||||
failed="${profile} (${retcode}) ${failed:-}"
|
||||
else
|
||||
success="${profile} ${success:-}"
|
||||
fi
|
||||
done
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
command="%%PREFIX%%/sbin/php-fpm"
|
||||
pidfile="/var/run/php-fpm.pid"
|
||||
extra_commands="reload configtest logrotate"
|
||||
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
|
||||
@ -46,7 +81,7 @@ php_fpm_logrotate() {
|
||||
php_fpm_checkconfig()
|
||||
{
|
||||
echo "Performing sanity check on php-fpm configuration:"
|
||||
eval ${command} -t
|
||||
eval ${command} ${php_fpm_flags} -t
|
||||
}
|
||||
|
||||
php_fpm_prestart()
|
||||
|
@ -300,10 +300,10 @@ lib/php/build/phpize.m4
|
||||
lib/php/build/pkg.m4
|
||||
lib/php/build/run-tests.php
|
||||
lib/php/build/shtool
|
||||
%%CGI%%man/man1/php-cgi.1.gz
|
||||
man/man1/php-config.1.gz
|
||||
%%CLI%%man/man1/php.1.gz
|
||||
%%PHPDBG%%man/man1/phpdbg.1.gz
|
||||
man/man1/phpize.1.gz
|
||||
%%FPM%%man/man8/php-fpm.8.gz
|
||||
%%CGI%%share/man/man1/php-cgi.1.gz
|
||||
share/man/man1/php-config.1.gz
|
||||
%%CLI%%share/man/man1/php.1.gz
|
||||
%%PHPDBG%%share/man/man1/phpdbg.1.gz
|
||||
share/man/man1/phpize.1.gz
|
||||
%%FPM%%share/man/man8/php-fpm.8.gz
|
||||
%%FPM%%share/php/fpm/status.html
|
||||
|
Loading…
Reference in New Issue
Block a user