freebsd-ports/net/activemq/pkg-install
Wen Heping 2bf8558f48 Apache ActiveMQ is the most popular and powerful open source messaging
and Integration Patterns provider.

WWW:    http://activemq.apache.org

PR:		ports/147759
Submitted by:	Gvozdikov Veniamin <g.veniamin@googlemail.com>
2010-06-12 01:11:12 +00:00

30 lines
907 B
Bash

#!/bin/sh
case $2 in
POST-INSTALL)
MQUSER=activemq
MQGROUP=${MQUSER}
MQUID=929
MQGID=${MQUID}
if ! pw group show "${MQGROUP}" > /dev/null; then
if pw groupadd ${MQGROUP} -g ${MQGID}; then
echo "Added group \"${MQGROUP}\"."
else
echo "Adding group \"${MQGROUP}\" failed..."
exit 1
fi
fi
if ! pw user show "${MQUSER}" > /dev/null; then
if pw useradd ${MQUSER} -u ${MQUID} -g ${MQGROUP} -h - \
-d /nonexistent -s /sbin/nologin -c "ActiveMQ Daemon"
then
echo "Added user \"${MQUSER}\"."
else
echo "Adding user \"${MQUSER}\" failed..."
exit 1
fi
fi
;;
esac