annotate install.bash @ 28:33e1e3910506

add configurable list of tlds
author carl
date Thu, 27 May 2004 10:08:51 -0700
parents 2e23b7184d2b
children ccf2c2651c1d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
96a9758165cd Initial revision
carl
parents:
diff changeset
1 #!/bin/bash
96a9758165cd Initial revision
carl
parents:
diff changeset
2
96a9758165cd Initial revision
carl
parents:
diff changeset
3 #####################
96a9758165cd Initial revision
carl
parents:
diff changeset
4 # stop the milter if it is already installed
96a9758165cd Initial revision
carl
parents:
diff changeset
5 if [ -f /etc/rc.d/init.d/dnsbl ]; then
96a9758165cd Initial revision
carl
parents:
diff changeset
6 /etc/rc.d/init.d/dnsbl stop
96a9758165cd Initial revision
carl
parents:
diff changeset
7 rm -f /etc/rc.d/init.d/dnsbl
96a9758165cd Initial revision
carl
parents:
diff changeset
8 fi
96a9758165cd Initial revision
carl
parents:
diff changeset
9
96a9758165cd Initial revision
carl
parents:
diff changeset
10
96a9758165cd Initial revision
carl
parents:
diff changeset
11 #####################
96a9758165cd Initial revision
carl
parents:
diff changeset
12 # build the milter
14
443aa0e8c6fa changes suggested by Nigel Horne
carl
parents: 8
diff changeset
13 # add compiler flags - suggested by Nigel Horne
443aa0e8c6fa changes suggested by Nigel Horne
carl
parents: 8
diff changeset
14 g++ -c $CXXFLAGS dnsbl.cpp
8
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
15 if [ $? -ne 0 ]; then
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
16 echo "compiler errors"
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
17 exit
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
18 fi
0
96a9758165cd Initial revision
carl
parents:
diff changeset
19 g++ -o dnsbl dnsbl.o /usr/lib/libresolv.a -lmilter -pthread
8
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
20 if [ $? -ne 0 ]; then
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
21 echo "linker errors"
0
96a9758165cd Initial revision
carl
parents:
diff changeset
22 exit
96a9758165cd Initial revision
carl
parents:
diff changeset
23 fi
96a9758165cd Initial revision
carl
parents:
diff changeset
24
96a9758165cd Initial revision
carl
parents:
diff changeset
25
96a9758165cd Initial revision
carl
parents:
diff changeset
26 #####################
96a9758165cd Initial revision
carl
parents:
diff changeset
27 # install the milter
96a9758165cd Initial revision
carl
parents:
diff changeset
28 DST=/var/dnsbl
96a9758165cd Initial revision
carl
parents:
diff changeset
29 mkdir -p $DST
14
443aa0e8c6fa changes suggested by Nigel Horne
carl
parents: 8
diff changeset
30 if [ ! -f $DST/dnsbl.conf ]; then
443aa0e8c6fa changes suggested by Nigel Horne
carl
parents: 8
diff changeset
31 cp dnsbl.conf $DST
443aa0e8c6fa changes suggested by Nigel Horne
carl
parents: 8
diff changeset
32 fi
24
2e23b7184d2b start coding for bad html tag detection
carl
parents: 23
diff changeset
33 if [ ! -f $DST/html-tags.conf ]; then
2e23b7184d2b start coding for bad html tag detection
carl
parents: 23
diff changeset
34 cp html-tags.conf $DST
2e23b7184d2b start coding for bad html tag detection
carl
parents: 23
diff changeset
35 fi
28
33e1e3910506 add configurable list of tlds
carl
parents: 24
diff changeset
36 if [ ! -f $DST/tld.conf ]; then
33e1e3910506 add configurable list of tlds
carl
parents: 24
diff changeset
37 cp tld.conf $DST
33e1e3910506 add configurable list of tlds
carl
parents: 24
diff changeset
38 fi
23
06de5ab6a232 add url decoding stage, allow http:/ single / in yahoo redirector, allow ip address hostnames
carl
parents: 14
diff changeset
39 mv -f dnsbl $DST
0
96a9758165cd Initial revision
carl
parents:
diff changeset
40 cp dnsbl.rc /etc/rc.d/init.d/dnsbl
96a9758165cd Initial revision
carl
parents:
diff changeset
41 chmod 755 /etc/rc.d/init.d/dnsbl
96a9758165cd Initial revision
carl
parents:
diff changeset
42 /sbin/chkconfig --add dnsbl
96a9758165cd Initial revision
carl
parents:
diff changeset
43 /sbin/chkconfig --level 2345 dnsbl on
96a9758165cd Initial revision
carl
parents:
diff changeset
44 /etc/rc.d/init.d/dnsbl start