1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-04 06:15:24 +00:00

lang/php70 and lang/php71: Add umask to php-fpm rc script

PR:           212911
Submitted by: Robert Kánia <rk@redb.cz>
This commit is contained in:
Torsten Zuehlsdorff 2017-06-28 09:40:58 +00:00
parent 6543b4eff8
commit 2a9f11b5c0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=444558
2 changed files with 32 additions and 2 deletions

View File

@ -17,7 +17,7 @@
name="php_fpm"
rcvar=php_fpm_enable
start_precmd="php_fpm_checkconfig"
start_precmd="php_fpm_prestart"
restart_precmd="php_fpm_checkconfig"
reload_precmd="php_fpm_checkconfig"
configtest_cmd="php_fpm_checkconfig"
@ -25,6 +25,7 @@ configtest_cmd="php_fpm_checkconfig"
load_rc_config "$name"
: ${php_fpm_enable="NO"}
: ${php_fpm_umask=""}
extra_commands="reload configtest logrotate"
@ -51,4 +52,18 @@ php_fpm_checkconfig()
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"

View File

@ -17,7 +17,7 @@
name="php_fpm"
rcvar=php_fpm_enable
start_precmd="php_fpm_checkconfig"
start_precmd="php_fpm_prestart"
restart_precmd="php_fpm_checkconfig"
reload_precmd="php_fpm_checkconfig"
configtest_cmd="php_fpm_checkconfig"
@ -25,6 +25,7 @@ configtest_cmd="php_fpm_checkconfig"
load_rc_config "$name"
: ${php_fpm_enable="NO"}
: ${php_fpm_umask=""}
extra_commands="reload configtest logrotate"
@ -51,4 +52,18 @@ php_fpm_checkconfig()
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"