#!/bin/bash

phase="$1"
version="$2"

if [ "x$phase" = "xpost" ] && [ "x$version" = "x5.0-0" ]; then
	rm -f /etc/apt/preferences.d/99kopanotest.pref
	rm -f /etc/apt/preferences.d/99kopano.pref
	rm -f /etc/apt/preferences.d/99kopano-externalrepo.pref
	rm -f /etc/apt/sources.list.d/00-updateucs5-kopano*list

	ucr commit /etc/apt/sources.list.d/kopano-core.list /etc/apt/sources.list.d/kopano-webapp.list /etc/apt/sources.list.d/z-push.list
fi

exit 0
