#!/bin/sh

set -e

case "$1" in
    configure)
     if [ -x /usr/sbin/dictdconfig ]; then dictdconfig -w ;fi
     if [ -x /etc/init.d/dictd ]; then
          if grep -iq '^[^#]*.utf-8' /etc/default/dictd; then
               if which invoke-rc.d >/dev/null 2>&1; then
                    invoke-rc.d dictd restart
               else
                    /etc/init.d/dictd restart
               fi
          else
               echo "   The parameter --locale=xx_YY.utf-8 was not set in your /etc/default/dictd,"
               echo "   so after installing this package dictd may stop working."
          fi
     fi

    ;;

    failed-upgrade|abort-upgrade|abort-remove|abort-deconfigure|in-favour|removing)

    ;;

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

#DEBHELPER#

exit 0
