X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=debian%2Fpostinst;h=98a24b1c9f6766d4add311167426d4c58bd45f18;hb=refs%2Fheads%2Forigin;hp=ff854eb0cedb5a1637cc2fe54bfab23f7882bd34;hpb=edbb239a67bd663c98c042c0d6da6af875c4ec6d;p=spamassassin-cn.git diff --git a/debian/postinst b/debian/postinst index ff854eb..98a24b1 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 @@ -382,7 +392,7 @@ sa-update \ --channelfile /etc/spamassassin/sa-update.channels \ --gpgkey 856AA88A \ --gpgkey 24F434CE \ - --gpgkey BDE9DC10 >>/var/log/sa-update.log 2>&1 || true + --gpgkey BDE9DC10 >>/var/log/sa-update.log 2>&1 & echo "CN: SpamAssassin updates are now logged at /var/log/sa-update.log" # restart the spamasassin @@ -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