1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
#!/bin/sh
#
# postrm -- clamsmtp post-remove maintainer script
#
set -e
if [ "$1" = "purge" ]; then
if [ -f /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
# Purge the clamsmtp spool directory?
db_get clamsmtp/purge || true
if [ "${RET:-false}" = "true" -a -d /var/spool/clamsmtp ] ; then
rm -rf /var/spool/clamsmtp || true
elif [ -d /var/spool/clamsmtp ] ; then
rmdir /var/spool/clamsmtp 2>/dev/null || true
fi
fi
if [ -d /var/run/clamsmtp ] ; then
rm -rf /var/run/clamsmtp
fi
# Remove clamav from clamsmtp group
if (getent group clamsmtp|grep clamav>/dev/null) ; then
if which deluser >/dev/null; then
deluser clamav clamsmtp || true
fi
if [ -x /etc/init.d/clamsmtp ]; then
# Attempt to stop and start clamav-daemon, getting
# cleaned group permissions.
(invoke-rc.d clamav-daemon stop && \
invoke-rc.d clamav-daemon start) || true
fi
fi
fi
#DEBHELPER#
if [ "$1" = "purge" ]; then
db_stop || true
fi
|