#! /bin/sh
#
# Copyright 1998 - 2001 Double Precision, Inc.  See COPYING for
# distribution information.

prefix="/usr/local"
exec_prefix="/usr/local"
sysconfdir="/usr/local/etc/courier"
localstatedir="/var/spool/courier"
bindir="/usr/local/bin"
sbindir="/usr/local/sbin"

case `basename $0` in
makesmtpaccess)
	. ${sysconfdir}/esmtpd
	;;
makesmtpaccess-msa)
	. ${sysconfdir}/esmtpd
	. ${sysconfdir}/esmtpd-msa
	;;
*)
	echo "I must be invoked as makesmtpaccess or makesmtpaccess-msa" >&2
	exit 1
	;;
esac

umask 022
${bindir}/makedat \
	-src=${ACCESSFILE} \
	-file=${ACCESSFILE}.dat \
	-tmp=${ACCESSFILE}.tmp -cidr || exit 1

${sbindir}/couriertcpd -pid=$PIDFILE -restart
