5 if [ -e /usr
/share
/debconf
/confmodule
] ; then
6 .
/usr
/share
/debconf
/confmodule
7 export debconfavailable
="yes"
10 if [ -n "$EX4DEBUG" ]; then
11 echo "now debugging $0 $@"
17 # work around apt purging -base before even removing -daemon #261994.
18 # postrm is good enough, we just need the init-script which is a conffile.
19 if [ -x /etc
/init.d
/exim4
]; then
20 if [ -n "$EX4DEBUG" ]; then
23 cat /run
/exim
4/exim.pid
26 if command -v invoke-rc.d
>/dev
/null
2>&1; then
27 invoke-rc.d exim4 stop
29 /etc
/init.d
/exim4 stop
31 if [ -n "$EX4DEBUG" ]; then
34 cat /run
/exim
4/exim.pid
37 echo >&2 "WARN: There are some exim4 processes still running after stopping exim"
41 rm -f /var
/lib
/exim
4/berkeleydbvers.txt
44 update-rc.d exim4 remove
> /dev
/null
46 # ask about purging mailqueue if debconf is available, keep it
48 if [ -e /var
/spool
/exim
4/input
] \
49 && ! rmdir /var
/spool
/exim
4/input
2>/dev
/null \
50 && [ "$debconfavailable" = "yes" ]; then
52 db_input medium exim
4/purge_spool || true
54 db_get exim
4/purge_spool
56 if [ "${purge_spool}" = "true" ] ; then
57 rm -rf /var
/spool
/exim
4/input
61 # remove logs and pid-dir.
62 rm -rf /run
/exim4
/var
/log
/exim4
/var
/spool
/exim
4/msglog \
63 /var
/spool
/exim
4/db
/var
/spool
/exim
4/exim-process.info \
64 /var
/spool
/exim
4/gnutls-params
*
65 rmdir /var
/spool
/exim4
/var
/lib
/exim4
2> /dev
/null || true