if [ "$run_as_user" = "non-root" ]; then
if ! grep -q '^OPTIONS=".*username=spamd"' \
/etc/default/spamassassin; then
- systemctl stop spamassassin
+ service spamassassin stop
rstart=yes
fi
elif [ "$run_as_user" = "root" ]; then
if grep -q '^OPTIONS=".*username=spamd"' \
/etc/default/spamassassin; then
- systemctl stop spamassassin
+ service spamassassin stop
restart=yes
fi
--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
- systemctl restart spamassassin
+ service spamassassin restart
fi
# restart the amavis
if [ "x$restart" = "xyes" -a -x /etc/init.d/amavis ]; then
- systemctl restart amavis
+ service amavis restart
fi
# dh_installdeb will replace this with shell code automatically