| Current Path : /proc/8644/root/proc/self/root/var/lib/dpkg/info/ |
| Current File : //proc/8644/root/proc/self/root/var/lib/dpkg/info/dovecot-common.postrm |
#!/bin/sh
set -e
PATH=/usr/sbin:$PATH
export PATH
if [ "$1" = "purge" ] ; then
for conffile in /etc/dovecot/dovecot.conf /etc/dovecot/dovecot-ldap.conf /etc/dovecot/dovecot-sql.conf /etc/ssl/certs/dovecot.pem /etc/ssl/private/dovecot.pem; do
# we mimic dpkg as closely as possible, so we remove configuration
# files with dpkg backup extensions too:
### Some of the following is from Tore Anderson:
for ext in '~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist; do
rm -f $conffile$ext
done
# remove the configuration file itself
rm -f $conffile
# and finally clear it out from the ucf database
if which ucf >/dev/null; then
ucf --purge $conffile
fi
if which ucfr >/dev/null; then
ucfr --purge dovecot-common $conffile
fi
done
userdel dovecot || true;
if [ -d /etc/ssl/certs ]; then
cd /etc/ssl/certs
PATH=$PATH:/usr/bin/ssl
if [ -f dovecot.pem ]; then
echo "SSL certificate /etc/ssl/certs/dovecot.pem is NOT removed."
echo "Please remove manually if required."
fi
if [ -f ../private/dovecot.pem ]; then
echo "SSL certificate /etc/ssl/private/dovecot.pem is NOT removed."
echo "Please remove manually if required."
fi
if [ -d /var/run/dovecot ]; then rm -rf /var/run/dovecot; fi
fi
fi
# Automatically added by dh_installinit
if [ "$1" = "purge" ] ; then
update-rc.d dovecot remove >/dev/null
fi
# End automatically added section