1 |
robbat2 08/07/05 09:46:28 |
2 |
|
3 |
Modified: update_google_safebrowsing.sh |
4 |
Added: update_google_safebrowsing.cron |
5 |
Log: |
6 |
Bug #204022, do not install a bad bit of cron foo. |
7 |
(Portage version: 2.2_rc1/cvs/Linux 2.6.26-rc4-00103-g1beee8d x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.2 dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/files/update_google_safebrowsing.sh |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/files/update_google_safebrowsing.sh?rev=1.2&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/files/update_google_safebrowsing.sh?rev=1.2&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/files/update_google_safebrowsing.sh?r1=1.1&r2=1.2 |
15 |
|
16 |
Index: update_google_safebrowsing.sh |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/files/update_google_safebrowsing.sh,v |
19 |
retrieving revision 1.1 |
20 |
retrieving revision 1.2 |
21 |
diff -p -w -b -B -u -u -r1.1 -r1.2 |
22 |
--- update_google_safebrowsing.sh 17 Oct 2007 08:47:41 -0000 1.1 |
23 |
+++ update_google_safebrowsing.sh 5 Jul 2008 09:46:28 -0000 1.2 |
24 |
@@ -1,7 +1,7 @@ |
25 |
#!/bin/sh |
26 |
# Copyright 1999-2007 Gentoo Foundation |
27 |
# Distributed under the terms of the GNU General Public License v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/files/update_google_safebrowsing.sh,v 1.1 2007/10/17 08:47:41 robbat2 Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/files/update_google_safebrowsing.sh,v 1.2 2008/07/05 09:46:28 robbat2 Exp $ |
30 |
# This cron script updates the Google SafeBrowsing lists for the use of the |
31 |
# Mail-SpamAssassin-Plugin-GoogleSafeBrowsing plugin. |
32 |
# It should be run every 25-30 minutes! http://code.google.com/apis/safebrowsing/developers_guide.html#AcceptableUsage |
33 |
@@ -9,6 +9,10 @@ CONFFILE="/etc/mail/spamassassin/24_goog |
34 |
OUTDIR="$(awk '/^google_safebrowsing_dir/{print $2}' "${CONFFILE}")" |
35 |
APIKEY="$(awk '/^google_safebrowsing_apikey/{print $2}' "${CONFFILE}")" |
36 |
LISTS="$(awk '/^google_safebrowsing_blocklist/{printf "%s ",$2}' "${CONFFILE}")" |
37 |
+if [ "$APIKEY" == "DEADBEEF" ]; then |
38 |
+ echo "No API key!" 1>&2 |
39 |
+ exit 1 |
40 |
+fi |
41 |
# Wait a little while, to avoid hammering the server |
42 |
sleep $(($RANDOM % 120)) |
43 |
# Use LISTS unquoted! |
44 |
|
45 |
|
46 |
|
47 |
1.1 dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/files/update_google_safebrowsing.cron |
48 |
|
49 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/files/update_google_safebrowsing.cron?rev=1.1&view=markup |
50 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/files/update_google_safebrowsing.cron?rev=1.1&content-type=text/plain |
51 |
|
52 |
Index: update_google_safebrowsing.cron |
53 |
=================================================================== |
54 |
# Copyright 1999-2007 Gentoo Foundation |
55 |
# Distributed under the terms of the GNU General Public License v2 |
56 |
# $Header: /var/cvsroot/gentoo-x86/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/files/update_google_safebrowsing.cron,v 1.1 2008/07/05 09:46:28 robbat2 Exp $ |
57 |
# |
58 |
*/30 * * * * root /usr/sbin/update_google_safebrowsing.sh |
59 |
|
60 |
|
61 |
|
62 |
-- |
63 |
gentoo-commits@l.g.o mailing list |