diff options
author | Sergey A. Osokin <osa@FreeBSD.org> | 2020-03-16 19:42:01 +0000 |
---|---|---|
committer | Sergey A. Osokin <osa@FreeBSD.org> | 2020-03-16 19:42:01 +0000 |
commit | ef7f75602684835c8c8a8c1c168d60fa0f752635 (patch) | |
tree | 01fe390bc4ab56cc677e68209b883cad0ba310f0 /www | |
parent | 56d7ba3512851dee3a89e30c45e9e373d0b299d1 (diff) | |
download | ports-ef7f75602684835c8c8a8c1c168d60fa0f752635.tar.gz ports-ef7f75602684835c8c8a8c1c168d60fa0f752635.zip |
Notes
Diffstat (limited to 'www')
-rw-r--r-- | www/unit/Makefile | 16 | ||||
-rw-r--r-- | www/unit/files/unitd.in | 11 |
2 files changed, 24 insertions, 3 deletions
diff --git a/www/unit/Makefile b/www/unit/Makefile index 12d24d77bab1..b61416027c80 100644 --- a/www/unit/Makefile +++ b/www/unit/Makefile @@ -3,6 +3,7 @@ PORTNAME= unit PORTVERSION= 1.16.0 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= https://unit.nginx.org/download/ @@ -48,16 +49,25 @@ CONFIGURE_ARGS= --prefix=${PREFIX} \ --modules=libexec/unit/modules \ --pid=${UNIT_PIDFILE} \ --state=libexec/unit \ - --tmp=${UNIT_TMPDIR} + --tmp=${UNIT_TMPDIR} \ + --user=${WWWOWN} --group=${WWWGRP} + +USERS?= ${WWWOWN} +GROUPS?=${WWWGRP} + +ALL_TARGET= -PLIST_FILES?= sbin/unitd PLIST_DIRS?= libexec/unit/modules \ libexec/unit +PLIST_FILES?= sbin/unitd USE_RC_SUBR?= unitd SUB_LIST= PREFIX=${PREFIX} \ UNIT_PIDFILE=${UNIT_PIDFILE} \ - UNIT_SOCK=${UNIT_SOCK} + UNIT_SOCK=${UNIT_SOCK} \ + UNIT_TMPDIR=${UNIT_TMPDIR} \ + WWWOWN=${WWWOWN} \ + WWWGRP=${WWWGRP} .if ${PORT_OPTIONS:MDEBUG} CONFIGURE_ARGS+=--debug diff --git a/www/unit/files/unitd.in b/www/unit/files/unitd.in index e5bb7728cc25..f558e277acd6 100644 --- a/www/unit/files/unitd.in +++ b/www/unit/files/unitd.in @@ -21,9 +21,20 @@ rcvar=unitd_enable command="%%PREFIX%%/sbin/unitd" start_precmd=start_precmd +_tmpprefix="%%UNIT_TMPDIR%%" + +unitd_checktmpdir() +{ + if [ ! -d ${_tmpprefix} ] ; then + install -d -o %%WWWOWN%% -g %%WWWGRP%% -m 755 ${_tmpprefix} + else + chown -R %%WWWOWN%%:%%WWWGRP%% ${_tmpprefix} + fi +} start_precmd() { + unitd_checktmpdir rm -f %%UNIT_SOCK%% } |