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

prefix="/usr/pkg"
exec_prefix="/usr/pkg"
sysconfdir="/usr/pkg/etc/courier"
localstatedir="/var/courier"
datadir="/usr/pkg/share/courier"
sbindir="${exec_prefix}/sbin"
libexecdir="/usr/pkg/libexec/courier"

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

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

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