blob: 1ab8adde91745f07e33438f7088e6ecc9c57c6a3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#!/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
|