pkgsrc/databases/gnats/INSTALL

41 lines
650 B
Text
Raw Normal View History

#!/bin/sh
#
# $NetBSD: INSTALL,v 1.1 2001/11/01 00:11:41 zuntum Exp $
#
PKGNAME=$1
STAGE=$2
USER="@USER@"
GROUP="@GROUP@"
PREFIX="@PREFIX@"
ADDUSER="@ADDUSER@"
ADDGROUP="@ADDGROUP@"
ID="@ID@"
MKDIR="@MKDIR@"
case ${STAGE} in
PRE-INSTALL)
${ID} ${USER} >/dev/null 2>&1
if [ $? -eq 0 ]; then
echo "User '${USER}' already exists...proceeding."
else
echo "Creating '${USER}' user..."
${MKDIR} ${PREFIX}/share/gnats/gnats-db
${ADDUSER} -c "GNATS database owner" -g ${GROUP} -s /bin/sh \
-d ${PREFIX}/share/gnats/gnats-db ${USER}
echo "Done."
fi
;;
POST-INSTALL)
;;
*)
echo "Unexpected argument: ${STAGE}"
exit 1
;;
esac
exit 0