2003-12-09 09:07:37 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
2004-10-25 13:09:20 +00:00
|
|
|
if [ x"$2" = xPOST-INSTALL ]; then
|
|
|
|
echo "============================================================"
|
|
|
|
if [ x"${DB_TYPE}" != "x" ]; then
|
|
|
|
echo "If this is your first installation of sympa, please load"
|
|
|
|
echo "this file with your ${DB_TYPE} database client:"
|
|
|
|
echo " ${PKG_PREFIX}/sympa/bin/create_db.${DB_TYPE}"
|
|
|
|
echo ""
|
|
|
|
fi
|
|
|
|
echo "To configure sympa interactively, please run:"
|
|
|
|
echo " perl ${PKG_PREFIX}/sympa/bin/sympa_wizard.pl"
|
|
|
|
echo ""
|
|
|
|
echo "You may also manually edit the two configuration files:"
|
|
|
|
echo " ${PKG_PREFIX}/etc/sympa.conf"
|
|
|
|
echo " ${PKG_PREFIX}/etc/wwsympa.conf"
|
|
|
|
echo "============================================================"
|
|
|
|
echo "To set up the wwsympa server, add something like this to"
|
|
|
|
echo "your Apache configuration file:"
|
|
|
|
echo ""
|
|
|
|
echo " DocumentRoot \"${PKG_PREFIX}/sympa\""
|
|
|
|
echo " AddDefaultCharset UTF-8"
|
|
|
|
echo " DirectoryIndex wws"
|
|
|
|
echo " Options +Indexes"
|
|
|
|
if [ x"${WITH_FASTCGI}" != x ]; then
|
|
|
|
echo " LoadModule fastcgi_module libexec/apache2/mod_fastcgi.so"
|
|
|
|
echo " <Location /wws>"
|
|
|
|
echo " SetHandler fastcgi-script"
|
|
|
|
echo " </Location>"
|
|
|
|
fi
|
|
|
|
echo " <Directory \"${PKG_PREFIX}/sympa\">"
|
|
|
|
echo " Allow from all"
|
|
|
|
echo " </Directory>"
|
|
|
|
echo " ScriptAlias /wws ${PKG_PREFIX}/sympa/bin/wwsympa-wrapper"
|
|
|
|
echo "============================================================"
|
|
|
|
exit 0
|
2004-03-16 22:06:04 +00:00
|
|
|
fi
|
|
|
|
|
2004-10-25 13:09:20 +00:00
|
|
|
if [ x"$2" != xPRE-INSTALL ]; then
|
2003-12-09 09:07:37 +00:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
USER=sympa
|
|
|
|
GROUP=${USER}
|
2005-02-27 13:55:24 +00:00
|
|
|
UID=200
|
2003-12-09 09:07:37 +00:00
|
|
|
GID=${UID}
|
|
|
|
|
|
|
|
if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
|
|
|
|
if pw groupadd ${GROUP} -g ${GID}; then
|
|
|
|
echo "Added group \"${GROUP}\"."
|
|
|
|
else
|
|
|
|
echo "Adding group \"${GROUP}\" failed..."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ! pw usershow "${USER}" 2>/dev/null 1>&2; then
|
|
|
|
if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
|
2004-10-25 13:09:20 +00:00
|
|
|
-s /sbin/nologin -d /nonexistent \
|
2003-12-22 08:52:11 +00:00
|
|
|
-c "Sympa Owner"; \
|
2003-12-09 09:07:37 +00:00
|
|
|
then
|
|
|
|
echo "Added user \"${USER}\"."
|
|
|
|
else
|
|
|
|
echo "Adding user \"${USER}\" failed..."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
exit 0
|