summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xspamassassin/sa-updateandimprove.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/spamassassin/sa-updateandimprove.sh b/spamassassin/sa-updateandimprove.sh
index f35d2f3..753e798 100755
--- a/spamassassin/sa-updateandimprove.sh
+++ b/spamassassin/sa-updateandimprove.sh
@@ -2,8 +2,8 @@
# Based on this: http://saupdates.openprotect.com/
-# Initialize only when forced
-if [ "$1" = "-f" ]; then
+# Install SARE GPG key
+if [ "$1" = "-i" ]; then
TMPFILE=‘mktemp‘
wget -O"$TMPFILE" http://saupdates.openprotect.com/pub.gpg
sa-update --import "$TMPFILE"
@@ -12,3 +12,8 @@ fi
sa-update --gpgkey D1C035168C1EBC08464946DA258CDB3ABDE9DC10 --channel saupdates.openprotect.com --channel updates.spamassassin.org
invoke-rc.d spamassassin restart > /dev/null
+
+# Install cronjob
+if [ "$1" = "-i" ]; then
+ ln -sf /etc/local-COMMON/spamassassin/sa-updateandimprove.sh /etc/cron.daily/local-sa-update
+fi