#!/bin/bash
CONFIG="/etc/cgiemail.conf"
set -e
# use debconf
. /usr/share/debconf/confmodule

# get configuration value
if [ -f $CONFIG ];
then
	. $CONFIG || true;
	db_set cgiemail/template_dir "$templatedir"
fi


if dpkg --compare-versions "$2" lt-nl 1.6-13;
then
	# if upgrading from an older version
	db_input critical cgiemail/template_dir || true;
else 
	# if installing new or upgrading from recent.
	db_input medium cgiemail/template_dir || true;
fi

db_go || true


#DEBHELPER#

