postrm is in exim4-base 4.82-3ubuntu2.
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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | #!/bin/sh
set -e
if [ -e /usr/share/debconf/confmodule ] ; then
. /usr/share/debconf/confmodule
export debconfavailable="yes"
fi
if [ -n "$EX4DEBUG" ]; then
echo "now debugging $0 $@"
set -x
fi
case "$1" in
remove)
# work around apt purging -base before even removing -daemon #261994.
# postrm is good enough, we just need the init-script which is a conffile.
if [ -x /etc/init.d/exim4 ]; then
if [ -n "$EX4DEBUG" ]; then
netstat -tulpen
ls -al /var/run/exim4/
cat /var/run/exim4/exim.pid
pidof exim4
fi
if command -v invoke-rc.d >/dev/null 2>&1; then
invoke-rc.d exim4 stop
else
/etc/init.d/exim4 stop
fi
if [ -n "$EX4DEBUG" ]; then
netstat -tulpen
ls -al /var/run/exim4/
cat /var/run/exim4/exim.pid
pidof exim4
if pidof exim4; then
echo >&2 "WARN: There are some exim4 processes still running after stopping exim"
fi
fi
fi
rm -f /var/lib/exim4/berkeleydbvers.txt
;;
purge)
update-rc.d exim4 remove > /dev/null
# ask about purging mailqueue if debconf is available, keep it
# otherwise
if [ -e /var/spool/exim4/input ] \
&& ! rmdir /var/spool/exim4/input 2>/dev/null \
&& [ "$debconfavailable" = "yes" ]; then
db_version 2.0
db_input medium exim4/purge_spool || true
db_go || true
db_get exim4/purge_spool
purge_spool="$RET"
if [ "${purge_spool}" = "true" ] ; then
rm -rf /var/spool/exim4/input
fi
fi
# remove logs and pid-dir.
rm -rf /var/run/exim4 /var/log/exim4 /var/spool/exim4/msglog \
/var/spool/exim4/db /var/spool/exim4/exim-process.info \
/var/spool/exim4/gnutls-params*
rmdir /var/spool/exim4 /var/lib/exim4 2> /dev/null || true
;;
esac
# 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
|