Rev 79 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 79 | Rev 80 | ||
---|---|---|---|
1 | #!/bin/sh |
1 | #!/bin/sh |
2 | set -e |
2 | set -e |
3 | 3 | ||
4 | if [ -f /usr/share/debconf/confmodule ]; then |
4 | if [ -f /usr/share/debconf/confmodule ]; then |
5 | . /usr/share/debconf/confmodule |
5 | . /usr/share/debconf/confmodule |
6 | fi |
6 | fi |
7 | 7 | ||
8 | LOCALSCANCONF=/etc/exim4/conf.d/main/15_sa-exim_plugin_path |
8 | LOCALSCANCONF=/etc/exim4/conf.d/main/15_sa-exim_plugin_path |
9 | DISABLELOCALSCANTEXT='# sa-exim plugin is disabled, because it was uninstalled' |
9 | DISABLELOCALSCANTEXT='# sa-exim plugin is disabled, because it was uninstalled' |
10 | DISABLELOCALSCANMD5=`echo "${DISABLELOCALSCANTEXT}" | md5sum | cut -d\ -f1` |
10 | DISABLELOCALSCANMD5=`echo "${DISABLELOCALSCANTEXT}" | md5sum | cut -d\ -f1` |
11 | 11 | ||
12 | case "$1" in |
12 | case "$1" in |
13 | remove) |
13 | remove) |
14 | # disable local_scan_path directive to exim working |
14 | # disable local_scan_path directive to exim working |
15 | if [ -e "$LOCALSCANCONF" ] && [ ! -e "${LOCALSCANCONF}.rul" ]; then |
15 | if [ -e "$LOCALSCANCONF" ] && [ ! -e "${LOCALSCANCONF}.rul" ]; then |
16 | echo "${DISABLELOCALSCANTEXT}" > ${LOCALSCANCONF}.rul |
16 | echo "${DISABLELOCALSCANTEXT}" > ${LOCALSCANCONF}.rul |
17 | fi |
17 | fi |
18 | if [ -x /etc/init.d/exim4 ]; then |
18 | if [ -x /etc/init.d/exim4 ]; then |
19 | if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then |
19 | if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then |
20 | invoke-rc.d exim4 reload || true |
20 | invoke-rc.d exim4 reload || true |
21 | else |
21 | else |
22 | /etc/init.d/exim4 reload || true |
22 | /etc/init.d/exim4 reload || true |
23 | fi |
23 | fi |
24 | fi |
24 | fi |
25 | ;; |
25 | ;; |
26 | 26 | ||
27 | purge) |
27 | purge) |
28 | # clean up temporary file generated by postrm uninstall |
28 | # clean up temporary file generated by postrm uninstall |
29 | if [ -e "${LOCALSCANCONF}.rul" ] && \ |
29 | if [ -e "${LOCALSCANCONF}.rul" ] && \ |
30 | [ "`md5sum ${LOCALSCANCONF}.rul | cut -d\ -f1`" = "${DISABLELOCALSCANMD5}" ]; then |
30 | [ "`md5sum ${LOCALSCANCONF}.rul | cut -d\ -f1`" = "${DISABLELOCALSCANMD5}" ]; then |
31 | rm ${LOCALSCANCONF}.rul |
31 | rm ${LOCALSCANCONF}.rul |
32 | fi |
32 | fi |
33 | if [ -x /etc/init.d/exim4 ]; then |
33 | if [ -x /etc/init.d/exim4 ]; then |
34 | if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then |
34 | if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then |
35 | invoke-rc.d exim4 reload || true |
35 | invoke-rc.d exim4 reload || true |
36 | else |
36 | else |
37 | /etc/init.d/exim4 reload || true |
37 | /etc/init.d/exim4 reload || true |
38 | fi |
38 | fi |
39 | fi |
39 | fi |
- | 40 | ||
- | 41 | rm -rf /var/spool/sa-exim/tuplets |
|
40 | # In the rather uncommon event that debconf has been removed before |
42 | # In the rather uncommon event that debconf has been removed before |
41 | # us, we have no choice but leaving the spool directory alone. |
43 | # us, we have no choice but leaving the spool directory alone. |
42 | if [ -e /var/spool/sa-exim ] && |
44 | if [ -e /var/spool/sa-exim ] && |
43 | ! rmdir /var/spool/sa-exim 2>/dev/null && |
45 | ! rmdir /var/spool/sa-exim 2>/dev/null && |
44 | [ -f /usr/share/debconf/confmodule ]; then |
46 | [ -f /usr/share/debconf/confmodule ]; then |
45 | db_version 2.0 |
47 | db_version 2.0 |
46 | db_input medium sa-exim/purge_spool || true |
48 | db_input medium sa-exim/purge_spool || true |
47 | db_go || true |
49 | db_go || true |
48 | db_get sa-exim/purge_spool |
50 | db_get sa-exim/purge_spool |
49 | purge_spool="$RET" |
51 | purge_spool="$RET" |
50 | if [ "x${purge_spool}" = "xtrue" ] ; then |
52 | if [ "x${purge_spool}" = "xtrue" ] ; then |
51 | rm -rf /var/spool/sa-exim |
53 | rm -rf /var/spool/sa-exim |
52 | fi |
54 | fi |
53 | fi |
55 | fi |
54 | ;; |
56 | ;; |
55 | esac |
57 | esac |
56 | 58 | ||
57 | #DEBHELPER# |
59 | #DEBHELPER# |