Rev 1 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | magnus | 1 | #!/bin/sh |
2 | set -e |
||
3 | |||
4 | . /usr/share/debconf/confmodule |
||
5 | |||
6 | LOCALSCANCONF=/etc/exim4/conf.d/main/15_sa-exim_plugin_path |
||
7 | DISABLELOCALSCANTEXT='# sa-exim plugin is disabled, because it was uninstalled' |
||
8 | DISABLELOCALSCANMD5=`echo "${DISABLELOCALSCANTEXT}" | md5sum | cut -d\ -f1` |
||
9 | |||
10 | case "$1" in |
||
11 | remove) |
||
12 | # disable local_scan_path directive to exim working |
||
13 | if [ -e "$LOCALSCANCONF" ] && [ ! -e "${LOCALSCANCONF}.rul" ]; then |
||
14 | echo "${DISABLELOCALSCANTEXT}" > ${LOCALSCANCONF}.rul |
||
15 | fi |
||
16 | if [ -x /etc/init.d/exim4 ]; then |
||
17 | if [ -x /usr/sbin/invoke-rc.d ]; then |
||
18 | invoke-rc.d exim4 reload || true |
||
19 | else |
||
20 | /etc/init.d/exim4 reload || true |
||
21 | fi |
||
22 | fi |
||
23 | ;; |
||
24 | |||
25 | purge) |
||
26 | # clean up temporary file generated by postrm uninstall |
||
27 | if [ -e "${LOCALSCANCONF}.rul" ] && \ |
||
28 | [ "`md5sum ${LOCALSCANCONF}.rul | cut -d\ -f1`" = "${DISABLELOCALSCANMD5}" ]; then |
||
29 | rm ${LOCALSCANCONF}.rul |
||
30 | fi |
||
31 | if [ -x /etc/init.d/exim4 ]; then |
||
32 | if [ -x /usr/sbin/invoke-rc.d ]; then |
||
33 | invoke-rc.d exim4 reload || true |
||
34 | else |
||
35 | /etc/init.d/exim4 reload || true |
||
36 | fi |
||
37 | fi |
||
38 | if [ -e /var/spool/sa-exim ] && ! rmdir /var/spool/sa-exim 2>/dev/null ; then |
||
39 | db_version 2.0 |
||
40 | db_input medium sa-exim/purge_spool || true |
||
41 | db_go || true |
||
42 | db_get sa-exim/purge_spool |
||
43 | purge_spool="$RET" |
||
44 | if [ "x${purge_spool}" = "xtrue" ] ; then |
||
45 | rm -rf /var/spool/sa-exim |
||
46 | fi |
||
47 | fi |
||
48 | ;; |
||
49 | esac |
||
50 | |||
51 | #DEBHELPER# |