mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-04 01:48:54 +00:00
60cbd05b04
- add two patch files for SQLite PR: ports/73029 Submitted by: clsung Approved by: maintainer (Autrijus Tang), co-mentor (vanilla)
40 lines
1006 B
Bash
40 lines
1006 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
|