#! /bin/sh
set -e

# For upgrade from versions < 0.4.2
if [ "$2" ] && dpkg --compare-versions "$2" lt 0.4.2 && \
   [ -f /etc/qcontrol.conf ] && [ ! -L /etc/qcontrol.conf ]; then
	mkdir -p /etc/qcontrol
	mv /etc/qcontrol.conf /etc/qcontrol/ts209.lua
fi

if dpkg-maintscript-helper supports rm_conffile; then
    dpkg-maintscript-helper rm_conffile \
        /etc/default/qcontrol 0.5.1-4~ qcontrol -- "$@"
fi

#DEBHELPER#
