1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-11 02:50:24 +00:00
freebsd-ports/mail/dcc-dccd/pkg-install
Pav Lucistnik 7794504fc8 - Update to 1.2.58
- Correct detection of sendmail port
- Don't delete config file if modified
- Use special user for setuid programs

PR:		ports/74158
Submitted by:	Dean Hollister <dean@odyssey.apana.org.au> (maintainer)
2004-11-21 02:35:46 +00:00

37 lines
713 B
Bash

#!/bin/sh
# $FreeBSD$
PREFIX=${PKG_PREFIX:-%%PREFIX%%}
DCCUSER=%%DCCUSER%%
DCCUID=%%DCCUID%%
DCCGROUP=%%DCCGROUP%%
DCCGID=%%DCCGID%%
if [ "$2" = "PRE-INSTALL" ]; then
if ! pw groupshow "$DCCGROUP" 2>/dev/null 1>&2; then
if pw groupadd $DCCGROUP -g $DCCGID; then
echo "=> Added group \"$DCCGROUP\"."
else
echo "=> Adding group \"$DCCGROUP\" failed..."
exit 1
fi
fi
if ! pw usershow "$DCCUSER" 2>/dev/null 1>&2; then
if pw useradd $DCCUSER -u $DCCUID -g $DCCGROUP -h - \
-s "/sbin/nologin" -d "/nonexistent" \
-c "Distributed Checksum Clearinghouse"; \
then
echo "=> Added user \"$DCCUSER\"."
else
echo "=> Adding user \"$DCCUSER\" failed..."
exit 1
fi
fi
fi
exit 0