#! /bin/sh
#
# Copyright 2015 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="${exec_prefix}/sbin"
libexecdir="/usr/local/libexec"

. ${sysconfdir}/imapd
. ${sysconfdir}/imapd-ssl

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

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