freebsd-ports/www/rt3/pkg-install
Cheng-Lung Sung 60cbd05b04 - update 3.0.12
- add two patch files for SQLite

PR:		ports/73029
Submitted by:	clsung
Approved by:	maintainer (Autrijus Tang), co-mentor (vanilla)
2004-10-23 07:29:33 +00:00

39 lines
1,006 B
Bash

#!/bin/sh
# $FreeBSD$
#
if [ x"$2" = xPRE-INSTALL ]; then
GROUP=rt
if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
if pw groupadd ${GROUP}; then
echo "Added group \"${GROUP}\"."
else
echo "Adding group \"${GROUP}\" failed..."
exit 1
fi
fi
fi
if [ x"$2" = xPOST-INSTALL ]; then
if [ x"${RT_PATH}" = x ]; then
RT_PATH="${PKG_PREFIX}/rt3"
fi
if [ x"${INITIAL_INSTALL}" = x ]; then
echo "Upgrade of RT3 complete."
echo ""
echo "If this is actually your first installation, please run:"
echo " " perl ${RT_PATH}/sbin/rt-setup-database --action init --dba DB_DBA_USER --prompt-for-dba-password
echo ""
echo "Substitute DB_DBA_USER with database administrator's name."
else
perl ${RT_PATH}/sbin/rt-setup-database --force --action drop --dba ${DB_DBA_USER} --dba-password ${DB_DBA_PASSWORD}
perl ${RT_PATH}/sbin/rt-setup-database --force --action init --dba ${DB_DBA_USER} --dba-password ${DB_DBA_PASSWORD}
sed s!%%RT_PATH%%!${RT_PATH}!g ${PKGMESSAGE}
fi
fi
exit 0