aboutsummaryrefslogtreecommitdiffstats
path: root/main/spamassassin/spamd.crond
diff options
context:
space:
mode:
Diffstat (limited to 'main/spamassassin/spamd.crond')
-rw-r--r--main/spamassassin/spamd.crond12
1 files changed, 12 insertions, 0 deletions
diff --git a/main/spamassassin/spamd.crond b/main/spamassassin/spamd.crond
index c9ccce550e..9c1a6cd3bf 100644
--- a/main/spamassassin/spamd.crond
+++ b/main/spamassassin/spamd.crond
@@ -1,3 +1,15 @@
#!/bin/sh
+set -e
+
+. /etc/conf.d/spamd
+pidfile="${pidfile:-/run/spamd.pid}"
+
+if [ -f "$pidfile" ]; then
+ _pid="$(cat "$pidfile")"
+fi
/usr/bin/sa-update
+if [ -n "$_pid" ]; then
+ kill -SIGHUP "$_pid"
+fi
+