mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-28 05:29:48 +00:00
e917cd1d09
- switch to rc.subr start mechanism - added user/group - added example data on install, target directory - added pkg-message - added more doc files PR: 65392 Submitted by: Paul Chvostek <paul+fbsd@it.ca>
31 lines
771 B
Bash
31 lines
771 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 "/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
|