#!/bin/sh

set -e
#set -x

if [ -f /usr/share/debconf/confmodule ]; then
    . /usr/share/debconf/confmodule
fi
if [ -f /usr/share/dbconfig-common/dpkg/postrm.mysql ]; then
    . /usr/share/dbconfig-common/dpkg/postrm.mysql
    dbc_go tweet-django $@
fi


if [ "$1" = "purge" ]; then
    for conffile in dbsettings.py settings.py; do
	rm -f /etc/tweet-django/$conffile
	if which ucf >/dev/null 2>&1; then
		ucf --debconf-ok --purge /etc/tweet-django/$conffile
		ucfr --purge tweet-django /etc/tweet-django/$conffile
	fi
    done
fi

#DEBHELPER#
