Switch to www:www

This commit is contained in:
Andrey A. Chernov 2001-10-21 17:33:37 +00:00
parent d473fdb9f3
commit eac6cc1767
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=49028
3 changed files with 64 additions and 7 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= apache
PORTVERSION= 1.3.22
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= www
MASTER_SITES= http://httpd.apache.org/dist/httpd/ \
ftp://ftp.ccs.neu.edu/net/mirrors/ftp.apache.org/apache/dist/httpd/ \
@ -31,14 +31,11 @@ DISTNAME= apache_${PORTVERSION}
MAINTAINER= ache@freebsd.org
#
# Set APACHE_PERF_TUNING env. variable to YES to get maximum performance
#
HAS_CONFIGURE= yes
CONFIGURE_ARGS= \
--prefix=${PREFIX} \
--server-gid=nogroup \
--server-uid=www \
--server-gid=www \
--with-perl=${PERL} \
--with-layout=${FILESDIR}/FreeBSD.layout:FreeBSD \
--suexec-docroot=${PREFIX}/www/data \
@ -54,7 +51,10 @@ OPTIM= -DHARD_SERVER_LIMIT=512 \
-DDEFAULT_PATH=\\"/bin:/usr/bin:${PREFIX}/bin\\" \
-DACCEPT_FILTER_NAME=\\"httpready\\"
.if defined(APACHE_PERF_TUNING) && ${APACHE_PERF_TUNING} == YES
#
# Set WITH_APACHE_PERF_TUNING env. variable to YES to get maximum performance
#
.if defined(WITH_APACHE_PERF_TUNING) && ${WITH_APACHE_PERF_TUNING} == YES
OPTIM+= -DBUFFERED_LOGS
CFLAGS+= -O6 -fomit-frame-pointer
.endif
@ -64,6 +64,9 @@ CONFIGURE_ENV= OPTIM='${OPTIM}'
MAN1= dbmmanage.1 htdigest.1 htpasswd.1
MAN8= ab.8 apachectl.8 apxs.8 httpd.8 logresolve.8 rotatelogs.8
pre-install:
PKG_PREFIX=${PREFIX} ./pkg-install ${PKGNAME} PRE-INSTALL
post-install:
@if [ ! -f ${PREFIX}/etc/rc.d/apache.sh ]; then \
${ECHO} "Installing ${PREFIX}/etc/rc.d/apache.sh startup file."; \

View File

@ -0,0 +1,20 @@
#!/bin/sh
# $FreeBSD$
#
if [ "$2" != "POST-DEINSTALL" ]; then
exit 0
fi
USER=www
if pw usershow "${USER}" 2>/dev/null 1>&2; then
if pw userdel ${USER}; then
echo "Delete user/group \"${USER}\"."
else
echo "Deleting user/group \"${USER}\" failed..."
exit 1
fi
fi
exit 0

34
www/apache13/pkg-install Normal file
View File

@ -0,0 +1,34 @@
#!/bin/sh
# $FreeBSD$
#
if [ "$2" != "PRE-INSTALL" ]; then
exit 0
fi
USER=www
GROUP=${USER}
UID=80
GID=${UID}
if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
if pw groupadd ${GROUP} -g ${GID}; then
echo "Added group \"${GROUP}\"."
else
echo "Adding group \"${GROUP}\" failed..."
exit 1
fi
fi
if ! pw usershow "${USER}" 2>/dev/null 1>&2; then
if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-s "/sbin/nologin" -d "/nonexistent" \
-c "World Wide Web Owner"; \
then
echo "Added user \"${USER}\"."
else
echo "Adding user \"${USER}\" failed..."
exit 1
fi
fi
exit 0