diff options
author | tz <tz@FreeBSD.org> | 2017-06-28 17:40:58 +0800 |
---|---|---|
committer | tz <tz@FreeBSD.org> | 2017-06-28 17:40:58 +0800 |
commit | 993c7ba729cd011aabd0f5a72751df45c1d36edb (patch) | |
tree | 6b991131214d43a774c062c5943d0f49d68e31c9 /lang/php71 | |
parent | bbb51103b023316132da3ca3de968be50c626e28 (diff) | |
download | freebsd-ports-gnome-993c7ba729cd011aabd0f5a72751df45c1d36edb.tar.gz freebsd-ports-gnome-993c7ba729cd011aabd0f5a72751df45c1d36edb.tar.zst freebsd-ports-gnome-993c7ba729cd011aabd0f5a72751df45c1d36edb.zip |
lang/php70 and lang/php71: Add umask to php-fpm rc script
PR: 212911
Submitted by: Robert Kánia <rk@redb.cz>
Diffstat (limited to 'lang/php71')
-rw-r--r-- | lang/php71/files/php-fpm.in | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lang/php71/files/php-fpm.in b/lang/php71/files/php-fpm.in index dfd243f88fad..1c9d7f5c81ba 100644 --- a/lang/php71/files/php-fpm.in +++ b/lang/php71/files/php-fpm.in @@ -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" |