#!/bin/sh -e

# Debian Postfix postinst
# LaMont Jones <lamont@debian.org>
# Based on debconf code by Colin Walters <walters@cis.ohio-state.edu>,
# and John Goerzen <jgoerzen@progenylinux.com>.

# Use debconf.
. /usr/share/debconf/confmodule
CHROOT=/var/spool/postfix

umask 022

# postinst processing

#DEBHELPER#

case "$1" in
    configure)
	# see below
	;;

    abort-upgrade)
	exit 0
	;;

    abort-remove|abort-deconfigure)
	exit 0
	;;

    *)
	echo "postinst called with unknown argument \`$1'" >&2
	exit 1
	;;
esac

CHANGES=""

cd /etc/postfix

# all done with debconf here.
db_stop

# start postfix
if [ -f /var/spool/postfix/restart ]; then
    rm -f /var/spool/postfix/restart
    /etc/init.d/postfix start
fi
