comparison install.bash @ 76:81f1e400e8ab

start coding on new config syntax
author carl
date Sat, 16 Jul 2005 13:47:19 -0700
parents 419e00901570
children 8487650c98ee
comparison
equal deleted inserted replaced
75:1142e46be550 76:81f1e400e8ab
9 9
10 10
11 ##################### 11 #####################
12 # build the milter 12 # build the milter
13 # add compiler flags - suggested by Nigel Horne 13 # add compiler flags - suggested by Nigel Horne
14 g++ -c $CXXFLAGS -pthread dnsbl.cpp 14 g++ -c $CXXFLAGS -pthread dnsbl.cpp scanner.cpp context.cpp tokenizer.cpp
15 if [ $? -ne 0 ]; then 15 if [ $? -ne 0 ]; then
16 echo "compiler errors" 16 echo "compiler errors"
17 exit 17 exit
18 fi 18 fi
19 g++ -o dnsbl dnsbl.o /usr/lib/libresolv.a -lmilter -pthread 19 g++ -o dnsbl dnsbl.o scanner.o context.o tokenizer.o /usr/lib/libresolv.a -lmilter -pthread
20 if [ $? -ne 0 ]; then 20 if [ $? -ne 0 ]; then
21 echo "linker errors" 21 echo "linker errors"
22 exit 22 exit
23 fi 23 fi
24 24
33 # move the conf files to the new location 33 # move the conf files to the new location
34 mv /var/dnsbl/*conf $DST 34 mv /var/dnsbl/*conf $DST
35 rm /var/dnsbl/dnsbl # remove the old binary 35 rm /var/dnsbl/dnsbl # remove the old binary
36 rmdir /var/dnsbl 36 rmdir /var/dnsbl
37 fi 37 fi
38 if [ ! -f $DST/dnsbl.conf ]; then 38 CONF=$DST/dnsbl.conf
39 cp dnsbl.conf $DST 39 if [ -f $CONF [; then
40 grep $CONF '^context' >/dev/null
41 if [ $? -eq 1 ]; then
42 # config file exists, but it is for the older version
43 # preserve it and start over
44 suf=4.old
45 for i in dnsbl hosts-ignore html-tags tld; do
46 j=$DST/$i.conf
47 if [ -f $j ]; then
48 mv -f $j $j.$suf
49 fi
50 done
51 fi
52 fi
53 if [ ! -f $CONF ]; then
54 cp dnsbl.conf $DST
55 cp hosts-ignore.conf $DST
56 cp html-tags.conf $DST
57 cp tld.conf $DST
40 fi 58 fi
41 if [ ! -f $DST/hosts-ignore.conf ]; then 59 if [ ! -f $DST/hosts-ignore.conf ]; then
42 cp hosts-ignore.conf $DST 60 cp hosts-ignore.conf $DST
43 fi 61 fi
44 if [ ! -f $DST/html-tags.conf ]; then 62 if [ ! -f $DST/html-tags.conf ]; then