head	1.2;
access;
symbols
	RELEASE_8_3_0:1.1
	RELEASE_9_0_0:1.1
	RELEASE_7_4_0:1.1
	RELEASE_8_2_0:1.1
	RELEASE_6_EOL:1.1
	RELEASE_8_1_0:1.1
	RELEASE_7_3_0:1.1
	RELEASE_8_0_0:1.1
	RELEASE_7_2_0:1.1
	RELEASE_7_1_0:1.1
	RELEASE_6_4_0:1.1
	RELEASE_5_EOL:1.1
	RELEASE_7_0_0:1.1
	RELEASE_6_3_0:1.1
	PRE_XORG_7:1.1
	RELEASE_4_EOL:1.1
	RELEASE_6_2_0:1.1
	RELEASE_6_1_0:1.1
	RELEASE_5_5_0:1.1
	RELEASE_6_0_0:1.1
	RELEASE_5_4_0:1.1
	RELEASE_4_11_0:1.1
	RELEASE_5_3_0:1.1
	RELEASE_4_10_0:1.1
	RELEASE_5_2_1:1.1
	RELEASE_5_2_0:1.1;
locks; strict;
comment	@# @;


1.2
date	2012.04.10.19.24.12;	author jgh;	state dead;
branches;
next	1.1;

1.1
date	2003.11.20.21.25.09;	author glewis;	state Exp;
branches;
next	;


desc
@@


1.2
log
@- port has expired, and is no longer supported upstream

2012-04-10  unsupported upstream, consider www/resin3

PR: ports/165867
Approved by:	maintainer, boris@@tagnet.ru
@
text
@#!/bin/sh
#
# Checks if the requested user and group exist. If they don't, then
# an attempt is made to create both.
#
# $FreeBSD: ports/www/resin2/files/pkg-install,v 1.1 2003/11/20 21:25:09 glewis Exp $
#
# Borrowed from the jakarta-tomcat port
#

set -e

RUNASUSER=%%RUNASUSER%%
RUNASUID=%%RUNASUID%%
GROUP=%%GROUP%%
GID=%%GID%%

if [ "$2" = "POST-INSTALL" ]; then
    # We're called after the 'make install' process
    # See if the group already exists
    if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then

        # If not, try to create it
        if pw groupadd ${GROUP} -g ${GID}; then
            echo "Added group \"${GROUP}\"."
        else
            echo "Adding group \"${GROUP}\" failed..."
            exit 1
        fi
    fi

    # See if the user already exists
    if ! pw usershow "${RUNASUSER}" 2>/dev/null 1>&2; then

        # If not, try to create it
        if pw useradd ${RUNASUSER} -u ${RUNASUID} -g ${GROUP} -h - \
            -s "/sbin/nologin" -d "/nonexistent" \
            -c "World Wide Web Owner"; \
        then
            echo "Added user \"${RUNASUSER}\"."
        else
            echo "Adding user \"${RUNASUSER}\" failed..."
            exit 1
        fi
    fi

    chown -R %%RUNASUSER%%:%%GROUP%% $PKG_PREFIX/%%APP_NAME%%
fi

exit 0
@


1.1
log
@. Avoid conflict between resin2 and resin3
. Fix resin{2,3}ctl first line (perl path)
. Pid file is no more created in the Makefile
. New resin.sh startup script, manages pid file
. pkg-[de]install and pkg-message are now generated
. Do not write anything after including bsd.port.post.mk
. Packages are now supported (reported by Arcadius Ahouansou)
. Integration with apxs for [de]activating mod_caucho

PR:		57566
Submitted by:	Jean-Baptiste Quenot <jbq@@caraldi.com> (maintainer)
@
text
@d6 1
a6 1
# $FreeBSD: ports/www/jakarta-tomcat5/pkg-deinstall,v 1.1 2003/08/13 11:39:38 znerd Exp $
@

