summaryrefslogtreecommitdiff
path: root/debian/exim4-base.postrm
blob: 82451d4aeb7eeee6813ca4ee31dd2eea0828211b (plain)
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
#!/bin/sh

set -e

. /usr/share/debconf/confmodule
case "$1" in
    purge)
	update-rc.d exim4 remove > /dev/null
	rm -f /etc/default/exim4

#inetd support has to wait for sarge +1
#	if [ -x /usr/sbin/update-inetd ]; then
#		update-inetd --remove exim4
#	fi
	
	if [ -e /var/spool/exim4/input ] && ! rmdir /var/spool/exim4/input 2>/dev/null ; then
		db_version 2.0
		db_input medium exim4/purge_spool || true
		db_go || true
		db_get exim4/purge_spool
		purge_spool="$RET"
		[ "x${purge_spool}" = "xtrue" ] && rm -rf /var/spool/exim4/input
	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
	rmdir /var/spool/exim4 /var/lib/exim4 2> /dev/null || true
	;;
esac

#DEBHELPER#