#!/bin/sh
set -e
# Automatically added by dh_installdeb/13.24.2
dpkg-maintscript-helper rm_conffile /etc/X11/Xsession.d/20controlportfilt -- "$@"
dpkg-maintscript-helper rm_conffile /etc/cpfpy.d/30_controlportfilt_default -- "$@"
dpkg-maintscript-helper rm_conffile /etc/cpfpy.d/30_default.conf -- "$@"
dpkg-maintscript-helper rm_conffile /etc/apparmor.d/usr.sbin.cpfpd -- "$@"
dpkg-maintscript-helper rm_conffile /etc/apparmor.d/usr.lib.tor-controlport-filter -- "$@"
dpkg-maintscript-helper rm_conffile /etc/tor-controlport-filter-merger.d/30_whonix.yml -- "$@"
dpkg-maintscript-helper rm_conffile /etc/onion-grater-merger.d/30_whonix.yml -- "$@"
# End automatically added section
# Automatically added by dh_installsystemd/13.24.2
if [ "$1" = remove ] && [ -d /run/systemd/system ] ; then
	systemctl --system daemon-reload >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_installsystemd/13.24.2
if [ "$1" = "purge" ]; then
	if [ -x "/usr/bin/deb-systemd-helper" ]; then
		deb-systemd-helper purge 'onion-grater.service' >/dev/null || true
	fi
fi
# End automatically added section
# Automatically added by dh_apparmor/4.1.0-1
if [ "$1" = "purge" ] && ! [ -e "/etc/apparmor.d/usr.lib.onion-grater" ] ; then
    rm -f "/etc/apparmor.d/disable/usr.lib.onion-grater" || true
    rm -f "/etc/apparmor.d/force-complain/usr.lib.onion-grater" || true
    rm -f "/etc/apparmor.d/local/usr.lib.onion-grater" || true
    rm -f /var/cache/apparmor/*/"usr.lib.onion-grater" || true
    rmdir /etc/apparmor.d/disable 2>/dev/null || true
    rmdir /etc/apparmor.d/local   2>/dev/null || true
    rmdir /etc/apparmor.d         2>/dev/null || true
fi
# End automatically added section
