#!/bin/sh

set -e

case "$1" in
    remove|purge)
        if command -v dictdconfig # update dictd's DB
        then
            dictdconfig -w
        fi
        # Reload a running server without starting a stopped service.
        if dpkg -s dictd 2> /dev/null | grep -qx 'Status: install ok installed' &&
            invoke-rc.d dictd status > /dev/null 2>&1
        then
            invoke-rc.d dictd reload
        fi
        exit 0
    ;;


    upgrade|abort-upgrade|abort-remove|abort-deconfigure|in-favour|removing)
        exit 0
    ;;

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

esac

#DEBHELPER#

exit 0
