pre_upgrade() {
	local new=$1 old=$2

	# On upgrade from <= 1.2.x to >= 1.3.x, automatically migrate the configs
	if [ `vercmp $old 1.3.0` -lt 0 ] && [ `vercmp $new 1.3.0` -ge 0 ]; then
		if [ -f etc/tlshd.conf ] && [ ! -f etc/tlshd/config ]; then
			echo "Migrating /etc/tlshd.conf to the new location"
			mkdir -vp etc/tlshd
			cp -avb etc/tlshd.conf etc/tlshd/config
			# The new template config will get installed as config.pacnew
		fi
	fi
}

post_upgrade() {
	local new=$1 old=$2
}
