1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-28 01:06:17 +00:00
freebsd-ports/net-im/openfire/pkg-install
Martin Wilke 6a97464491 - Update to 3.5.1 [1]
- Fix some errors on user/group creation phase [2]

PR:		123124 [1]
		122914 [2]
Submitted by:	Linh Pham <question+fbsdports@closedsrc.org> [1]
		Nikolay Pavlov <qpadla@gmail.com> [2] (maintainer)
Approved by:	maintainer
2008-04-29 13:01:21 +00:00

31 lines
890 B
Bash

#!/bin/sh
case $2 in
POST-INSTALL)
PUSER=openfire
PGROUP=${PUSER}
PUID=342
PGID=${PUID}
if ! pw group show "${PGROUP}" > /dev/null; then
if pw groupadd ${PGROUP} -g ${PGID}; then
echo "Added group \"${PGROUP}\"."
else
echo "Adding group \"${PGROUP}\" failed..."
exit 1
fi
fi
if ! pw user show "${PUSER}" > /dev/null; then
if pw useradd ${PUSER} -u ${PUID} -g ${PGROUP} -h - \
-d /nonexistent -s /sbin/nologin -c "Openfire Daemon"
then
echo "Added user \"${PUSER}\"."
else
echo "Adding user \"${PUSER}\" failed..."
exit 1
fi
fi
;;
esac