File: //var/lib/dpkg/info/spamassassin.prerm
#!/bin/sh
set -e
# Automatically added by dh_installsystemd/13.6ubuntu1
if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = remove ] && [ -d /run/systemd/system ] ; then
deb-systemd-invoke stop 'spamassassin.service' >/dev/null || true
fi
# End automatically added section
# In theory sa-update-keys is probably a config file, but I don't
# think it should be and I don't know how to get rid of it and
# /etc/spamassassin without causing dpkg to complain on purge.
if [ "$1" = "remove" ]; then
invoke-rc.d --quiet spamassassin stop || true
rm -Rf /var/lib/spamassassin
rm -Rf /etc/spamassassin/sa-update-keys
fi