#!/bin/sh

set -e

. /usr/share/debconf/confmodule

db_title "ht://Dig"

# check configstyle
if [ -f /etc/htdig ]; then
	CONF=/etc/htdig.conf
else
	CONF=/etc/htdig/htdig.conf
fi

# warn about the change in database location
if grep /var/spool $CONF; then
	db_input high htdig/dblocation-changed || true
   db_go
fi

# ask about htnotify
db_input medium htdig/run-htnotify || true
db_go



# ask to generate ht://Dig databases now
db_input medium htdig/generate-databases || true
db_go

exit 0
