Rev 1 | Rev 4 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1 | Rev 3 | ||
---|---|---|---|
1 | #!/bin/sh |
1 | #!/bin/sh |
2 | set -e |
2 | set -e |
3 | 3 | ||
4 | . /usr/share/debconf/confmodule |
4 | . /usr/share/debconf/confmodule |
5 | 5 | ||
6 | LOCALSCANCONF=/etc/exim4/conf.d/main/15_sa-exim_plugin_path |
6 | LOCALSCANCONF=/etc/exim4/conf.d/main/15_sa-exim_plugin_path |
7 | DISABLELOCALSCANTEXT='# sa-exim plugin is disabled, because it was uninstalled' |
7 | DISABLELOCALSCANTEXT='# sa-exim plugin is disabled, because it was uninstalled' |
8 | DISABLELOCALSCANMD5=`echo "${DISABLELOCALSCANTEXT}" | md5sum | cut -d\ -f1` |
8 | DISABLELOCALSCANMD5=`echo "${DISABLELOCALSCANTEXT}" | md5sum | cut -d\ -f1` |
9 | 9 | ||
10 | OLDCRONJOB=/etc/cron.hourly/greylistclean |
10 | OLDCRONJOB=/etc/cron.hourly/greylistclean |
11 | OLDCRONJOBREN=/etc/cron.hourly/.greylistclean.insecure.deleteme |
11 | OLDCRONJOBREN=/etc/cron.hourly/.greylistclean.insecure.deleteme |
12 | if test -f $OLDCRONJOB; then |
12 | if test -f $OLDCRONJOB; then |
13 | echo "disabling old insecure $OLDCRONJOB" |
13 | echo "disabling old insecure $OLDCRONJOB" |
14 | echo "(renamed to $OLDCRONJOBREN)" |
14 | echo "(renamed to $OLDCRONJOBREN)" |
15 | echo "See new cronjob in /etc/cron.d/greylistclean" |
15 | echo "See new cronjob in /etc/cron.d/greylistclean" |
16 | /bin/mv $OLDCRONJOB $OLDCRONJOBREN |
16 | /bin/mv $OLDCRONJOB $OLDCRONJOBREN |
17 | fi |
17 | fi |
18 | 18 | ||
19 | case "$1" in |
19 | case "$1" in |
20 | configure) |
20 | configure) |
21 | if [ ! -e /var/spool/sa-exim ] ; then |
21 | if [ ! -e /var/spool/sa-exim ] ; then |
22 | # Debian-exim should exist as we depend on exim4-base |
22 | # Debian-exim should exist as we depend on exim4-base |
23 | install -d -m770 -oDebian-exim -gDebian-exim \ |
23 | install -d -m770 -oDebian-exim -gDebian-exim \ |
24 | /var/spool/sa-exim |
24 | /var/spool/sa-exim |
25 | fi |
25 | fi |
26 | # Support for greylisting tuplets (written as nobody by spamd) |
26 | # Support for greylisting tuplets (written as nobody by spamd) |
27 | if [ ! -e /var/spool/sa-exim/tuplets ] ; then |
27 | if [ ! -e /var/spool/sa-exim/tuplets ] ; then |
28 | install -d -m750 -onobody -gDebian-exim \ |
28 | install -d -m750 -onobody -gDebian-exim \ |
29 | /var/spool/sa-exim/tuplets |
29 | /var/spool/sa-exim/tuplets |
30 | fi |
30 | fi |
31 | # clean up temporary file generated by postrm uninstall |
31 | # clean up temporary file generated by postrm uninstall |
32 | if [ -e "${LOCALSCANCONF}.rul" ] && \ |
32 | if [ -e "${LOCALSCANCONF}.rul" ] && \ |
33 | [ "`md5sum ${LOCALSCANCONF}.rul | cut -d\ -f1`" = "${DISABLELOCALSCANMD5}" ]; then |
33 | [ "`md5sum ${LOCALSCANCONF}.rul | cut -d\ -f1`" = "${DISABLELOCALSCANMD5}" ]; then |
34 | rm ${LOCALSCANCONF}.rul |
34 | rm ${LOCALSCANCONF}.rul |
35 | fi |
35 | fi |
36 | if [ -x /etc/init.d/exim4 ]; then |
36 | if [ -x /etc/init.d/exim4 ]; then |
37 | if [ -x /usr/sbin/invoke-rc.d ]; then |
37 | if [ -x /usr/sbin/invoke-rc.d ]; then |
38 | invoke-rc.d exim4 reload || true |
38 | invoke-rc.d exim4 reload || true |
39 | else |
39 | else |
40 | /etc/init.d/exim4 reload || true |
40 | /etc/init.d/exim4 reload || true |
41 | fi |
41 | fi |
42 | fi |
42 | fi |
43 | ;; |
43 | ;; |
44 | 44 | ||
45 | esac |
45 | esac |
46 | 46 | ||
47 | #DEBHELPER# |
47 | #DEBHELPER# |