diff options
author | osa <osa@FreeBSD.org> | 2012-06-13 12:46:14 +0800 |
---|---|---|
committer | osa <osa@FreeBSD.org> | 2012-06-13 12:46:14 +0800 |
commit | 3bd8cd72e9926ac7415fb537c85253827e5b83fc (patch) | |
tree | fd91281c741206689db45b94fbf468e3cd8d34dc /www | |
parent | ae1a23628d557b778b1ad45ffcdc0baf1d7a0bb6 (diff) | |
download | freebsd-ports-gnome-3bd8cd72e9926ac7415fb537c85253827e5b83fc.tar.gz freebsd-ports-gnome-3bd8cd72e9926ac7415fb537c85253827e5b83fc.tar.zst freebsd-ports-gnome-3bd8cd72e9926ac7415fb537c85253827e5b83fc.zip |
Check existence temporary directory %%NGINX_TMPDIR%% before
test configuration. (1)
Use %%NGINX_RUNDIR%%, %%WWWOWN%% and %%WWWGRP%% variables defined
in Makefile instead of hardcoded or new values.
Bump PORTREVISION.
Idea from PR: 168836 (1)
Diffstat (limited to 'www')
-rw-r--r-- | www/nginx-devel/Makefile | 6 | ||||
-rw-r--r-- | www/nginx-devel/files/nginx.sh.in | 16 | ||||
-rw-r--r-- | www/nginx/Makefile | 6 | ||||
-rw-r--r-- | www/nginx/files/nginx.sh.in | 16 |
4 files changed, 38 insertions, 6 deletions
diff --git a/www/nginx-devel/Makefile b/www/nginx-devel/Makefile index 12b11a7b2c65..4cf46f680a99 100644 --- a/www/nginx-devel/Makefile +++ b/www/nginx-devel/Makefile @@ -7,6 +7,7 @@ PORTNAME= nginx PORTVERSION= 1.3.1 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= http://nginx.org/download/ MASTER_SITES+= ${MASTER_SITE_LOCAL} @@ -207,7 +208,10 @@ NGINX_ERRORLOG?= ${NGINX_LOGDIR}/nginx-error.log CONFLICTS?= nginx-1.* USE_RC_SUBR= nginx.sh -SUB_LIST+= WWWOWN=${WWWOWN} +SUB_LIST+= WWWOWN=${WWWOWN} \ + WWWGRP=${WWWGRP} \ + NGINX_RUNDIR=${NGINX_RUNDIR} \ + NGINX_TMPDIR=${NGINX_TMPDIR} .if !defined(NO_INSTALL_MANPAGES) MAN8= nginx.8 .endif diff --git a/www/nginx-devel/files/nginx.sh.in b/www/nginx-devel/files/nginx.sh.in index 03c6600014cb..1fdec800414a 100644 --- a/www/nginx-devel/files/nginx.sh.in +++ b/www/nginx-devel/files/nginx.sh.in @@ -32,8 +32,9 @@ gracefulstop_cmd="nginx_gracefulstop" upgrade_precmd="nginx_checkconfig" upgrade_cmd="nginx_upgrade" command="%%PREFIX%%/sbin/nginx" -_pidprefix="/var/run/nginx" -pidfile="${_pidprefix}.pid" +_pidprefix="%%NGINX_RUNDIR%%" +pidfile="${_pidprefix}/${name}.pid" +_tmpprefix="%%NGINX_TMPDIR%%" required_files=%%PREFIX%%/etc/nginx/nginx.conf extra_commands="reload configtest upgrade gracefulstop" @@ -77,8 +78,19 @@ else fi fi +# tmpfs(5) +nginx_checktmpdir() +{ + if [ ! -d ${_tmpprefix} ] ; then + mkdir -p ${_tmpprefix} + chown %%WWWOWN%%:%%WWWGRP%% ${_tmpprefix} + fi +} + nginx_checkconfig() { + nginx_checktmpdir + echo "Performing sanity check on nginx configuration:" eval ${command} ${nginx_flags} -t } diff --git a/www/nginx/Makefile b/www/nginx/Makefile index ac9e721ba2bd..a47c0951283d 100644 --- a/www/nginx/Makefile +++ b/www/nginx/Makefile @@ -7,6 +7,7 @@ PORTNAME= nginx PORTVERSION= 1.2.1 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= www MASTER_SITES= http://nginx.org/download/ @@ -207,7 +208,10 @@ NGINX_ERRORLOG?= ${NGINX_LOGDIR}/nginx-error.log CONFLICTS?= nginx-devel-1.* USE_RC_SUBR= nginx.sh -SUB_LIST+= WWWOWN=${WWWOWN} +SUB_LIST+= WWWOWN=${WWWOWN} \ + WWWGRP=${WWWGRP} \ + NGINX_RUNDIR=${NGINX_RUNDIR} \ + NGINX_TMPDIR=${NGINX_TMPDIR} .if !defined(NO_INSTALL_MANPAGES) MAN8= nginx.8 .endif diff --git a/www/nginx/files/nginx.sh.in b/www/nginx/files/nginx.sh.in index 03c6600014cb..1fdec800414a 100644 --- a/www/nginx/files/nginx.sh.in +++ b/www/nginx/files/nginx.sh.in @@ -32,8 +32,9 @@ gracefulstop_cmd="nginx_gracefulstop" upgrade_precmd="nginx_checkconfig" upgrade_cmd="nginx_upgrade" command="%%PREFIX%%/sbin/nginx" -_pidprefix="/var/run/nginx" -pidfile="${_pidprefix}.pid" +_pidprefix="%%NGINX_RUNDIR%%" +pidfile="${_pidprefix}/${name}.pid" +_tmpprefix="%%NGINX_TMPDIR%%" required_files=%%PREFIX%%/etc/nginx/nginx.conf extra_commands="reload configtest upgrade gracefulstop" @@ -77,8 +78,19 @@ else fi fi +# tmpfs(5) +nginx_checktmpdir() +{ + if [ ! -d ${_tmpprefix} ] ; then + mkdir -p ${_tmpprefix} + chown %%WWWOWN%%:%%WWWGRP%% ${_tmpprefix} + fi +} + nginx_checkconfig() { + nginx_checktmpdir + echo "Performing sanity check on nginx configuration:" eval ${command} ${nginx_flags} -t } |