freebsd-ports/net-im/openfire-devel/pkg-install
Pietro Cerutti 202dd48e7f - New port: net-im/openfire-devel
Development version of net-im/openfire

Feature safe:	yes
2011-01-24 10:27:41 +00:00

30 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