freebsd-ports/irc/ptlink-ircd/pkg-install

29 lines
552 B
Text
Raw Normal View History

#!/bin/sh
#
# $FreeBSD$
#
case $2 in
POST-INSTALL)
USER=ircd
GROUP=ircd
UID=72
GID=72
if pw groupshow "${GROUP}" > /dev/null 2>&1; then
2005-09-18 17:22:04 +02:00
echo "===> Using existing group ${GROUP}"
else
2005-09-18 17:22:04 +02:00
echo "===> Adding group ${GROUP}"
pw groupadd ${GROUP} -g ${GID} || exit 1
fi
if pw usershow "${USER}" > /dev/null 2>&1; then
2005-09-18 17:22:04 +02:00
echo "===> Using existing user ${USER}"
else
2005-09-18 17:22:04 +02:00
echo "===> Adding user ${USER}"
pw adduser ${USER} -u ${UID} -g ${GROUP} -h - -d "/nonexistent" \
2005-09-18 17:22:04 +02:00
-s "/nonexistent" -c "IRC daemon" || exit 1
fi
;;
esac