Mercurial > dnsbl
diff 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 |
line wrap: on
line diff
--- a/install.bash Wed Jul 13 23:04:14 2005 -0700 +++ b/install.bash Sat Jul 16 13:47:19 2005 -0700 @@ -11,12 +11,12 @@ ##################### # build the milter # add compiler flags - suggested by Nigel Horne -g++ -c $CXXFLAGS -pthread dnsbl.cpp +g++ -c $CXXFLAGS -pthread dnsbl.cpp scanner.cpp context.cpp tokenizer.cpp if [ $? -ne 0 ]; then echo "compiler errors" exit fi -g++ -o dnsbl dnsbl.o /usr/lib/libresolv.a -lmilter -pthread +g++ -o dnsbl dnsbl.o scanner.o context.o tokenizer.o /usr/lib/libresolv.a -lmilter -pthread if [ $? -ne 0 ]; then echo "linker errors" exit @@ -35,8 +35,26 @@ rm /var/dnsbl/dnsbl # remove the old binary rmdir /var/dnsbl fi -if [ ! -f $DST/dnsbl.conf ]; then +CONF=$DST/dnsbl.conf +if [ -f $CONF [; then + grep $CONF '^context' >/dev/null + if [ $? -eq 1 ]; then + # config file exists, but it is for the older version + # preserve it and start over + suf=4.old + for i in dnsbl hosts-ignore html-tags tld; do + j=$DST/$i.conf + if [ -f $j ]; then + mv -f $j $j.$suf + fi + done + fi +fi +if [ ! -f $CONF ]; then cp dnsbl.conf $DST + cp hosts-ignore.conf $DST + cp html-tags.conf $DST + cp tld.conf $DST fi if [ ! -f $DST/hosts-ignore.conf ]; then cp hosts-ignore.conf $DST