1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-17 03:25:46 +00:00
freebsd-ports/dns/rbldnsd/pkg-install
Yen-Ming Lee 58e0038aaa - Updating to current version (released 2006-07-26).
- renamed start script to modern format (without .sh)
- Added better example data (including pkg-message)
- utilize SUB_FILES

PR:		103153
Submitted by:	paul+ports at it.ca
2006-09-22 04:34:41 +00:00

31 lines
775 B
Bash

#!/bin/sh
if [ "$2" != "PRE-INSTALL" ]; then
exit 0
fi
RBLDNSUSER=${RBLDNSUSER:-rbldns}
RBLDNSGROUP=${RBLDNSGROUP:-rbldns}
if ! pw groupshow "$RBLDNSGROUP" 2>/dev/null 1>&2; then
if pw groupadd $RBLDNSGROUP; then
echo "=> Added group \"$RBLDNSGROUP\"."
else
echo "=> Adding group \"$RBLDNSGROUP\" failed..."
exit 1
fi
fi
if ! pw usershow "$RBLDNSUSER" 2>/dev/null 1>&2; then
if pw useradd $RBLDNSUSER -g $RBLDNSGROUP -h - \
-s "/usr/sbin/nologin" -d "/nonexistent" \
-c "rbldnsd pseudo-user"; \
then
echo "=> Added user \"$RBLDNSUSER\"."
else
echo "=> Adding user \"$RBLDNSUSER\" failed..."
exit 1
fi
fi
exit 0