]>
Commit | Line | Data |
---|---|---|
4f43e117 ER |
1 | #!/bin/sh |
2 | ||
3 | sleep $(expr $RANDOM % 7200) | |
4 | # Only restart spamd if sa-update returns 0, meaning it updated the rules | |
5 | /usr/bin/sa-update || exit $? | |
6 | ||
7 | if [ -x /usr/bin/sa-compile ]; then | |
8 | out=$(/usr/bin/sa-compile 2>&1) | |
9 | rc=$? | |
10 | if [ $rc -gt 0 ]; then | |
11 | echo >&2 "$out" | |
12 | exit $rc | |
13 | fi | |
14 | fi | |
15 | ||
16 | if [ -x /etc/rc.d/init.d/spamd ]; then | |
17 | /sbin/service spamd restart > /dev/null | |
18 | fi |