#!/bin/sh -e

INIT_FILE="/etc/init.d/postfix-cluebringer"
DAEMON="postfix-cluebringer"

. /usr/share/debconf/confmodule
. /usr/share/dbconfig-common/dpkg/prerm

dbc_fisrt_version=2.0.10-1
dbc_go postfix-cluebringer $@

case "$1" in
	remove)
		# Stop the daemon
		if [ -x /usr/sbin/invoke-rc.d ]; then
				invoke-rc.d $DAEMON stop || exit $?
			else
				$INIT_FILE stop >/dev/null || exit $?
		fi
		;;

	upgrade|failed-upgrade|deconfigure)
		;;

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

exit 0

# Automatically added by dh_installinit
if [ -x "/etc/init.d/postfix-cluebringer" ]; then
	if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
		invoke-rc.d postfix-cluebringer stop || exit $?
	else
		/etc/init.d/postfix-cluebringer stop || exit $?
	fi
fi
# End automatically added section

