openbsd-ports/net/totd/pkg/INSTALL
2003-04-26 14:55:32 +00:00

47 lines
1.0 KiB
Plaintext
Executable File

#! /bin/sh
# $OpenBSD: INSTALL,v 1.2 2003/04/26 14:55:32 sturm Exp $
#
# Post-installation setup of totd - based on majordomo INSTALL script
# from daniel@reichardt.ch
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIG_FILE=${SYSCONFDIR}/totd.conf
do_install_configuration()
{
echo -n "Let's see if there is already a configuration file... "
if [ -f ${CONFIG_FILE} ]; then
echo "yes"
echo "Please compare your existing configuration with"
echo "${PREFIX}/share/totd/totd.conf.sample"
else
echo "no"
echo -n "Copying sample configuration file... "
install -o root -g wheel -m 644 ${PREFIX}/share/totd/totd.conf.sample \
${CONFIG_FILE}
echo "ok"
echo "Please review new configuration ${CONFIG_FILE}"
fi
}
if [ $# -ne 2 ]; then
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
fi
case $2 in
PRE-INSTALL)
;;
POST-INSTALL)
do_install_configuration
;;
*)
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
;;
esac
exit 0