]> git.pld-linux.org Git - packages/spamassassin.git/blob - sa-update.sh
- BR capitalization
[packages/spamassassin.git] / sa-update.sh
1 #!/bin/sh
2
3 OPT=""
4
5 [ -f /etc/mail/spamassassin/channels ] && OPT="$OPT --channelfile /etc/mail/spamassassin/channels"
6
7 sleep $(expr $RANDOM % 7200)
8 # Only restart spamd if sa-update returns 0, meaning it updated the rules
9 /usr/bin/sa-update $OPT || exit $?
10
11 if [ -x /usr/bin/sa-compile ]; then
12         out=$(/usr/bin/sa-compile 2>&1)
13         rc=$?
14         if [ $rc -gt 0 ]; then
15                 echo >&2 "$out"
16                 exit $rc
17         fi
18 fi
19
20 if [ -x /etc/rc.d/init.d/spamd -a -e /var/lock/subsys/spamd ]; then
21         /sbin/service spamd restart > /dev/null
22 fi
This page took 0.078694 seconds and 3 git commands to generate.