aports/main/spamassassin/spamd.crond
Mark Hills ba6c3cbb37 main/spamassassin: fix noisy cron job
run-parts: /etc/periodic/daily/spamassassin-update: exit status 1
2023-11-01 08:23:32 +00:00

27 lines
365 B
Bash
Executable file

#!/bin/sh
set -e
if [ -f /etc/conf.d/spamd ]; then
. /etc/conf.d/spamd
fi
pidfile="${pidfile:-/run/spamd.pid}"
if [ -f "$pidfile" ]; then
_pid="$(cat "$pidfile")"
fi
/usr/bin/sa-update && R=0 || R=$?
case "$R" in
0)
;;
1)
# "No fresh updates were available"; see sa-update(1)
exit 0
;;
*)
exit $R
esac
if [ -n "$_pid" ]; then
kill -SIGHUP "$_pid"
fi