#!/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 ]; then
        . /usr/share/dbconfig-common/dpkg/postrm 
        dbc_go movabletype-opensource $@
fi

case "$1" in
    purge)
        # If ucf isn't installed, shouldn't be an error
        ucf --purge /etc/movabletype-opensource/mt-config.cgi || true
        rm -f /etc/movabletype-opensource/mt-config.cgi
    ;;
    purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
    ;;

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

#DEBHELPER#
