#!/bin/sh
set -e

if [ "$1" = purge ]; then
    rm -f /etc/ipa/default.conf
    rm -f /etc/pki/nssdb/cert8.db \
          /etc/pki/nssdb/key3.db \
          /etc/pki/nssdb/secmod.db
    rm -f /etc/ipa/nssdb/cert8.db \
          /etc/ipa/nssdb/key3.db \
          /etc/ipa/nssdb/pwdfile.txt \
          /etc/ipa/nssdb/secmod.db \
          /etc/ipa/nssdb/*.orig
    rmdir /etc/pki/nssdb || true
    rmdir /etc/ipa/nssdb || true
    rmdir /etc/ipa || true
    rm -rf /var/lib/ipa-client
    rm -f /var/log/ipaclient-upgrade.log
fi

# Automatically added by dh_installsystemd/13.23~bpo12+1
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.23~bpo12+1
if [ "$1" = "purge" ]; then
	if [ -x "/usr/bin/deb-systemd-helper" ]; then
		deb-systemd-helper purge 'ipa-epn.service' 'ipa-epn.timer' >/dev/null || true
	fi
fi
# End automatically added section


