X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=debian%2Fpostinst;h=f11ad7980fae785d169402465027c2ffe5984cc9;hb=b4a6f3f88087c11d5a99763307408ef478bb0f52;hp=dae4cb2091f3c86ac8bfba72d80eae85e6e5af33;hpb=7e9107b7fa1a92e21a0a45e5133860f5a909064d;p=spamassassin-cn.git diff --git a/debian/postinst b/debian/postinst index dae4cb2..f11ad79 100755 --- a/debian/postinst +++ b/debian/postinst @@ -59,7 +59,7 @@ db_stop || true if [ "$run_as_user" = "non-root" ]; then if ! grep -q '^OPTIONS=".*username=spamd"' \ /etc/default/spamassassin; then - service stop spamassassin + service spamassassin stop rstart=yes fi @@ -87,7 +87,7 @@ if [ "$run_as_user" = "non-root" ]; then elif [ "$run_as_user" = "root" ]; then if grep -q '^OPTIONS=".*username=spamd"' \ /etc/default/spamassassin; then - service stop spamassassin + service spamassassin stop restart=yes fi @@ -395,17 +395,25 @@ sa-update \ --gpgkey 6C6191E3 \ --gpgkey 24F434CE \ --gpgkey BDE9DC10 >>/var/log/sa-update.log 2>&1 & + +# get rules https://sysportal.carnet.hr/node/1793 +echo "CN: Downloading new GPG key for SpamAssassin from http://spamassassin.apache.org/updates/GPG.KEY" +echo "$(date +'%d-%m-%Y %T'): Downloading new GPG key from http://spamassassin.apache.org/updates/GPG.KEY ..." >> \ + /var/log/sa-update.log +wget -O - http://spamassassin.apache.org/updates/GPG.KEY 2> /dev/null | sa-update --import - +sa-update -v +restart=yes echo "CN: SpamAssassin updates are now logged at /var/log/sa-update.log" # restart the spamasassin if [ "x$restart" = "xyes" ]; then pkill -f /usr/sbin/spamd || true - service restart spamassassin + service spamassassin restart fi # restart the amavis if [ "x$restart" = "xyes" -a -x /etc/init.d/amavis ]; then - service restart amavis + service amavis restart fi # dh_installdeb will replace this with shell code automatically