Rev 4 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4 | Rev 30 | ||
---|---|---|---|
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 -m771 -oDebian-exim -gDebian-exim \ |
23 | install -d -m771 -oDebian-exim -gDebian-exim \ |
24 | /var/spool/sa-exim |
24 | /var/spool/sa-exim |
25 | elif [ -d /var/spool/sa-exim ]; then |
25 | elif [ -d /var/spool/sa-exim ]; then |
26 | # Fix permissions |
26 | # Fix permissions |
27 | chmod 771 /var/spool/sa-exim |
27 | chmod 771 /var/spool/sa-exim |
28 | chown Debian-exim:Debian-exim /var/spool/sa-exim |
28 | chown Debian-exim:Debian-exim /var/spool/sa-exim |
29 | fi |
29 | fi |
30 | # Support for greylisting tuplets (written as nobody by spamd) |
30 | # Support for greylisting tuplets (written as nobody by spamd) |
31 | if [ ! -e /var/spool/sa-exim/tuplets ] ; then |
31 | if [ ! -e /var/spool/sa-exim/tuplets ] ; then |
32 | install -d -m750 -onobody -gDebian-exim \ |
32 | install -d -m750 -onobody -gDebian-exim \ |
33 | /var/spool/sa-exim/tuplets |
33 | /var/spool/sa-exim/tuplets |
34 | elif [ -d /var/spool/sa-exim/tuplets ]; then |
34 | elif [ -d /var/spool/sa-exim/tuplets ]; then |
35 | # Fix permissions |
35 | # Fix permissions |
36 | chmod 771 /var/spool/sa-exim/tuplets |
36 | chmod 771 /var/spool/sa-exim/tuplets |
37 | chown nobody:Debian-exim /var/spool/sa-exim/tuplets |
37 | chown nobody:Debian-exim /var/spool/sa-exim/tuplets |
38 | fi |
38 | fi |
39 | # clean up temporary file generated by postrm uninstall |
39 | # clean up temporary file generated by postrm uninstall |
40 | if [ -e "${LOCALSCANCONF}.rul" ] && \ |
40 | if [ -e "${LOCALSCANCONF}.rul" ] && \ |
41 | [ "`md5sum ${LOCALSCANCONF}.rul | cut -d\ -f1`" = "${DISABLELOCALSCANMD5}" ]; then |
41 | [ "`md5sum ${LOCALSCANCONF}.rul | cut -d\ -f1`" = "${DISABLELOCALSCANMD5}" ]; then |
42 | rm ${LOCALSCANCONF}.rul |
42 | rm ${LOCALSCANCONF}.rul |
43 | fi |
43 | fi |
44 | if [ -x /etc/init.d/exim4 ]; then |
44 | if [ -x /etc/init.d/exim4 ]; then |
45 | if [ -x /usr/sbin/invoke-rc.d ]; then |
45 | if [ -x /usr/sbin/invoke-rc.d ]; then |
46 | invoke-rc.d exim4 reload || true |
46 | invoke-rc.d exim4 reload || true |
47 | else |
47 | else |
48 | /etc/init.d/exim4 reload || true |
48 | /etc/init.d/exim4 reload || true |
49 | fi |
49 | fi |
50 | fi |
50 | fi |
51 | ;; |
51 | ;; |
52 | 52 | ||
53 | esac |
53 | esac |
54 | 54 | ||
55 | #DEBHELPER# |
55 | #DEBHELPER# |