postrm is in clamsmtp 1.10-9ubuntu1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
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 42 43 44 45 46 47 48 49 50 51 52 | #!/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 [ -x /usr/sbin/deluser ]; then
deluser clamav clamsmtp || true
fi
if [ -x /usr/sbin/invoke-rc.d ]; 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
# Automatically added by dh_installinit
if [ "$1" = "purge" ] ; then
update-rc.d clamsmtp remove >/dev/null
fi
# End automatically added section
# Automatically added by dh_installdebconf
if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
db_purge
fi
# End automatically added section
if [ "$1" = "purge" ]; then
db_stop || true
fi
|