SOURCES: sa-update.sh - channels file support

arekm arekm at pld-linux.org
Fri Aug 29 10:20:18 CEST 2008


Author: arekm                        Date: Fri Aug 29 08:20:18 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- channels file support

---- Files affected:
SOURCES:
   sa-update.sh (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SOURCES/sa-update.sh
diff -u SOURCES/sa-update.sh:1.1 SOURCES/sa-update.sh:1.2
--- SOURCES/sa-update.sh:1.1	Mon Jun 18 09:40:50 2007
+++ SOURCES/sa-update.sh	Fri Aug 29 10:20:13 2008
@@ -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 @@
 	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
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/sa-update.sh?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list