X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=debian%2Fpostinst;h=7f549ccd856acd5319599a0da7467f090b8ab819;hb=refs%2Ftags%2Fv3.3.1-1;hp=ff854eb0cedb5a1637cc2fe54bfab23f7882bd34;hpb=d97a7dd1153ca03f569ba5100147d8b2a6551fb1;p=spamassassin-cn.git diff --git a/debian/postinst b/debian/postinst index ff854eb..7f549cc 100755 --- a/debian/postinst +++ b/debian/postinst @@ -287,6 +287,16 @@ for i in $list; do mv -f $i.$$ $i fi rm -f $i.$$ + + # enable AWL + cp -f $i $i.$$ + plugin="loadplugin Mail::SpamAssassin::Plugin::AWL" + cp_check_and_sed "^#$plugin.*$" \ + "s/^#$plugin.*$/$plugin/g" $i.$$ || true + if ! cmp -s $i.$$ $i; then + mv -f $i.$$ $i + fi + rm -f $i.$$ done # check and replace /etc/default/spamasassin if needed @@ -396,7 +406,13 @@ if [ "x$restart" = "xyes" ]; then fi # restart the amavis -if [ "x$restart" = "xyes" -a -x /etc/init.d/amavis ]; then +if [ "x$restart" = "xyes" -a -x /etc/init.d/amavisd-cn ]; then + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d --quiet amavisd-cn restart + else + /etc/init.d/amavisd-cn restart + fi +elif [ "x$restart" = "xyes" -a -x /etc/init.d/amavis ]; then if [ -x /usr/sbin/invoke-rc.d ]; then invoke-rc.d --quiet amavis restart else