#!/bin/sh
# postrm script for matomo

set -eu

if [ "$1" = "purge" ]; then
	rm -f /usr/share/matomo/config/config.ini.php
	if which ucf >/dev/null 2>&1; then
		ucf --debconf-ok --purge /usr/share/matomo/config/config.ini.php
	fi
fi

if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then

	if [ "$1" = "purge" ]; then
		rm -rf /var/cache/matomo/tmp /usr/share/matomo/config
	fi
fi

#DEBHELPER#

exit 0
