head	1.3;
access;
symbols
	RELEASE_9_0_0:1.2
	RELEASE_7_4_0:1.2
	RELEASE_8_2_0:1.2
	RELEASE_6_EOL:1.2
	RELEASE_8_1_0:1.2
	RELEASE_7_3_0:1.2
	RELEASE_8_0_0:1.2
	RELEASE_7_2_0:1.2
	RELEASE_7_1_0:1.2
	RELEASE_6_4_0:1.2
	RELEASE_5_EOL:1.2
	RELEASE_7_0_0:1.2
	RELEASE_6_3_0:1.2
	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
	RELEASE_4_9_0:1.1
	RELEASE_5_1_0:1.1
	RELEASE_4_8_0:1.1
	RELEASE_5_0_0:1.1
	RELEASE_4_7_0:1.1;
locks; strict;
comment	@# @;


1.3
date	2012.02.25.16.15.12;	author zi;	state dead;
branches;
next	1.2;

1.2
date	2007.08.28.10.01.00;	author roam;	state Exp;
branches;
next	1.1;

1.1
date	2002.09.20.09.29.10;	author roam;	state Exp;
branches;
next	;


desc
@@


1.3
log
@- Update to 4.52
- Use USERS/GROUPS
- Remove support for FreeBSD 5.x/6.x
- Cosmetic changes
@
text
@#! /bin/sh
#
# $FreeBSD: ports/security/stunnel/pkg-install,v 1.2 2007/08/28 10:01:00 roam Exp $
# taken from devel/perforce

PATH=/bin:/usr/sbin

STUNNEL_USER=${STUNNEL_USER:-stunnel}
STUNNEL_GROUP=${STUNNEL_GROUP:-stunnel}

case $2 in
POST-INSTALL)
	USER=${STUNNEL_USER}
	GROUP=${STUNNEL_GROUP}

	if pw group show "${GROUP}" 2>/dev/null; then
		echo "You already have a group \"${GROUP}\", so I will use it."
	else
		if pw groupadd -g 341 -n ${GROUP} ; then
			echo "Added group \"${GROUP}\"."
		else
			echo "Adding group \"${GROUP}\" failed..."
			exit 1
		fi
	fi

	if pw user show "${USER}" 2>/dev/null; then
		echo "You already have a user \"${USER}\", so I will use it."
	else
		if pw useradd -u 341 -n ${USER} -g ${GROUP} -h - \
			-d /nonexistent -c "stunnel Daemon" -s /sbin/nologin
		then
			echo "Added user \"${USER}\"."
		else
			echo "Adding user \"${USER}\" failed..."
			exit 1
		fi
	fi

	;;
esac
@


1.2
log
@Reserve a user and group ID for the stunnel daemon.
Loosely based on the PR, although I just used the next available UID/GID.

PR:		108784
Submitted by:	Alex Kozlov <spam@@rm-rf.kiev.ua>
@
text
@d3 1
a3 1
# $FreeBSD: ports/security/stunnel/pkg-install,v 1.1 2002/09/20 09:29:10 roam Exp $
@


1.1
log
@Update to stunnel-4.00.

*** WARNING WARNING WARNING ***
The stunnel invocation has changed!  The program no longer accepts
command-line options, but is controlled by a config file instead.
Please refer to the stunnel(8) manual page for more information.

PR:		42249
Submitted by:	Dan Langille <dan@@langille.org>, lioux
@
text
@d3 1
a3 1
# $FreeBSD$
d19 1
a19 1
		if pw groupadd ${GROUP} ; then
d30 1
a30 1
		if pw useradd ${USER} -g ${GROUP} -h - \
@

