openbsd-ports/sysutils/modlogan/pkg/INSTALL
margarida 5065b47ba4 Initial import of modlogan-0.8.7
--
ModLogAn is a modular logfile analyzer which is able to analyze
15 logfiles from different servers.
Its template engine generates XHTML based on usersupplied themes
which makes it possible to provide different look and feel.
It's written in C and provides a plugin system.

From: Michael Coulter <mjc@bitz.ca> with some changes from me.
2003-05-02 02:53:05 +00:00

70 lines
1.8 KiB
Plaintext

#!/bin/sh
#
# Pre/post-installation setup of modlogan
# exit on errors, use a sane path and install prefix
#
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIG_DIR=${SYSCONFDIR}/modlogan
SAMPLE_CONFIG_DIR=$PREFIX/share/examples/modlogan
do_notice()
{
echo
echo "+---------------"
echo "| The existing $1 configuration files in,"
echo "| $CONFIG_DIR have NOT been changed."
echo "| You may want to compare them to the current sample files"
echo "| in $SAMPLE_CONFIG_DIR, and update your configuration"
echo "| as needed."
echo "+---------------"
echo
}
do_install()
{
install -d -o root -g wheel -m 755 $CONFIG_DIR
install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/*.conf $CONFIG_DIR/
install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/modlogan.def.conf-dist $CONFIG_DIR/modlogan.def.conf
install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/modlogan.conf-dist $CONFIG_DIR/modlogan.conf
install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/modlogan.css-dist $CONFIG_DIR/modlogan.css
echo
echo "+---------------"
echo "| The $1 configuration files have been installed into"
echo "| $CONFIG_DIR. Please view these files and change the"
echo "| configuration to meet your needs."
echo "+---------------"
echo
}
# verify proper execution
#
if [ $# -ne 2 ]; then
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
fi
# Verify/process the command
#
case $2 in
PRE-INSTALL)
: nothing to pre-install for this port
;;
POST-INSTALL)
if [ ! -d $CONFIG_DIR ]; then
do_install $1
elif [ ! -f $CONFIG_DIR/modlogan.conf ]; then
do_install $1
else
do_notice $1
fi
;;
*)
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
;;
esac
exit 0