aboutsummaryrefslogtreecommitdiffstats
path: root/main/spamassassin/spamd.crond
diff options
context:
space:
mode:
authorSimon Frankenberger <simon@fraho.eu>2019-04-08 18:11:16 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2019-05-27 10:14:30 +0000
commit09335491ac1dee80b41fcc69b7681b3b73ee09fb (patch)
tree4aa5e5267baa2d7221a4fd32a9b897c1358f1fcb /main/spamassassin/spamd.crond
parent6880ba3448fee476192db1bc0f338eb43916fc27 (diff)
downloadaports-09335491ac1dee80b41fcc69b7681b3b73ee09fb.tar.gz
aports-09335491ac1dee80b41fcc69b7681b3b73ee09fb.tar.bz2
aports-09335491ac1dee80b41fcc69b7681b3b73ee09fb.tar.xz
main/spamassassin: Reload spamd after sa-update
This fixes Bug #10208 https://bugs.alpinelinux.org/issues/10208
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
+