head	1.5;
access;
symbols
	RELEASE_6_0_0:1.4
	RELEASE_5_4_0:1.4
	RELEASE_4_11_0:1.4
	RELEASE_5_3_0:1.4
	RELEASE_4_10_0:1.4
	RELEASE_5_2_1:1.3
	RELEASE_5_2_0:1.3
	RELEASE_4_9_0:1.3
	RELEASE_5_1_0:1.3
	RELEASE_4_8_0:1.3
	RELEASE_5_0_0:1.3
	RELEASE_4_7_0:1.3
	RELEASE_4_6_2:1.3
	RELEASE_4_6_1:1.3
	RELEASE_4_6_0:1.3
	RELEASE_5_0_DP1:1.3
	RELEASE_4_5_0:1.3;
locks; strict;
comment	@# @;


1.5
date	2005.12.04.00.27.19;	author clement;	state dead;
branches;
next	1.4;

1.4
date	2004.04.07.14.27.47;	author clement;	state Exp;
branches;
next	1.3;

1.3
date	2001.10.29.20.05.37;	author ache;	state Exp;
branches;
next	1.2;

1.2
date	2001.10.29.20.04.00;	author ache;	state dead;
branches;
next	1.1;

1.1
date	2001.10.24.16.03.34;	author ache;	state Exp;
branches;
next	;


desc
@@


1.5
log
@- retire www/apache2
@
text
@#!/bin/sh
# $FreeBSD: ports/www/apache2/pkg-install,v 1.4 2004/04/07 14:27:47 clement Exp $
#

if [ "$2" != "PRE-INSTALL" ]; then
	exit 0
fi

WWWUSER=www
WWWGROUP=${WWWUSER}
WWWUID=80
WWWGID=${WWWUID}

if ! pw groupshow "${WWWGROUP}" 2>/dev/null 1>&2; then
	if pw groupadd ${WWWGROUP} -g ${WWWGID}; then
		echo "Added group \"${WWWGROUP}\"."
	else
		echo "Adding group \"${WWWGROUP}\" failed..."
		exit 1
	fi
fi

if ! pw usershow "${WWWUSER}" 2>/dev/null 1>&2; then
	if pw useradd ${WWWUSER} -u ${WWWUID} -g ${WWWGROUP} -h - \
		-s "/sbin/nologin" -d "/nonexistent" \
		-c "World Wide Web Owner"; \
	then
		echo "Added user \"${WWWUSER}\"."
	else
		echo "Adding user \"${WWWUSER}\" failed..."
		exit 1
	fi
fi

exit 0
@


1.4
log
@- Fix install when people use a different /bin/sh
  This shouldn't have been fixed, but I don't like setting UID and GID
  variables.
  so ${*} -> ${WWW*}

PR:		64032
Noticed by:	Patrick Schoenfeld <schoenfeld@@in-medias-res.com>
@
text
@d2 1
a2 1
# $FreeBSD: ports/www/apache2/pkg-install,v 1.3 2001/10/29 20:05:37 ache Exp $
@


1.3
log
@Second part to fix missing x-bit on pkg*install

PR:		31599
@
text
@d2 1
a2 1
# $FreeBSD: ports/www/apache2/pkg-install,v 1.1 2001/10/24 16:03:34 ache Exp $
d9 4
a12 4
USER=www
GROUP=${USER}
UID=80
GID=${UID}
d14 3
a16 3
if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
	if pw groupadd ${GROUP} -g ${GID}; then
		echo "Added group \"${GROUP}\"."
d18 1
a18 1
		echo "Adding group \"${GROUP}\" failed..."
d23 2
a24 2
if ! pw usershow "${USER}" 2>/dev/null 1>&2; then
	if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
d28 1
a28 1
		echo "Added user \"${USER}\"."
d30 1
a30 1
		echo "Adding user \"${USER}\" failed..."
@


1.2
log
@First part to fix missing x-bit on pkg*install
@
text
@d6 1
a6 1
    exit 0
d34 1
@


1.1
log
@Sync with main Apache

Submitted by:	MAINTAINER
@
text
@d2 1
a2 1
# $FreeBSD: ports/www/apache13/pkg-install,v 1.1 2001/10/21 17:33:37 ache Exp $
@

