]> git.pld-linux.org Git - packages/spamassassin.git/commitdiff
- channels file support
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Fri, 29 Aug 2008 08:20:13 +0000 (08:20 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    sa-update.sh -> 1.2

sa-update.sh

index fbc97c171cead98c0c499c57985a98e7940e2ecd..0dbf59add72152168fc450d06d409945eef8e61e 100644 (file)
@@ -1,8 +1,12 @@
 #!/bin/sh
 
+OPT=""
+
+[ -f /etc/mail/spamassassin/channels ] && OPT="$OPT --channelfile /etc/mail/spamassassin/channels"
+
 sleep $(expr $RANDOM % 7200)
 # Only restart spamd if sa-update returns 0, meaning it updated the rules
-/usr/bin/sa-update || exit $?
+/usr/bin/sa-update $OPT || exit $?
 
 if [ -x /usr/bin/sa-compile ]; then
        out=$(/usr/bin/sa-compile 2>&1)
@@ -13,6 +17,6 @@ if [ -x /usr/bin/sa-compile ]; then
        fi
 fi
 
-if [ -x /etc/rc.d/init.d/spamd ]; then
+if [ -x /etc/rc.d/init.d/spamd -a -e /var/lock/subsys/spamd ]; then
        /sbin/service spamd restart > /dev/null
 fi
This page took 0.028707 seconds and 4 git commands to generate.