#! /bin/sh
set -e

# For downgrade to versions < 0.4.2
if [ "$1" = upgrade ] && dpkg --compare-versions "$2" lt 0.4.2; then
	rm -f /etc/qcontrol.conf
	mv /etc/qcontrol/ts209.lua /etc/qcontrol.conf
	rm -rf /etc/qcontrol/
fi

#DEBHELPER#
