comparison test.bash @ 8:dbe18921f741

integration work on url scanner
author carl
date Thu, 22 Apr 2004 11:25:45 -0700
parents 793ac9cc114d
children 8c65411cd7ab
comparison
equal deleted inserted replaced
7:93ff6d1ef647 8:dbe18921f741
1 #!/bin/bash 1 #!/bin/bash
2 2
3 g++ -c dnsbl.cpp 3 g++ -c dnsbl.cpp
4 if [ $? -ne 0 ]; then
5 echo "compiler errors"
6 exit
7 fi
4 g++ -o dnsbl dnsbl.o /usr/lib/libresolv.a -lmilter -pthread 8 g++ -o dnsbl dnsbl.o /usr/lib/libresolv.a -lmilter -pthread
9 if [ $? -ne 0 ]; then
10 echo "linker errors"
11 exit
12 fi
13
5 if [ "$1" == "comp" ]; then 14 if [ "$1" == "comp" ]; then
6 exit 15 exit
7 fi 16 fi
8 17
9 # build the test.cf file 18 # build the test.cf file
14 echo start the milter 23 echo start the milter
15 mkdir -p /var/run/dnsbl 24 mkdir -p /var/run/dnsbl
16 chmod 700 /var/run/dnsbl 25 chmod 700 /var/run/dnsbl
17 mv -f $pid $pid.save 26 mv -f $pid $pid.save
18 rm -f /var/run/dnsbl/dnsbl.sock 27 rm -f /var/run/dnsbl/dnsbl.sock
19 cp /var/dnsbl/*conf . 28 dir=`pwd`
20 ./dnsbl -c -p local:/var/run/dnsbl/dnsbl.sock >check.txt 2>&1 29 pushd /var/dnsbl
21 #sleep 5 30 echo "$dir/dnsbl -p local:/var/run/dnsbl/dnsbl.sock"
22 #P2=`cat $pid` 31 $dir/dnsbl -p local:/var/run/dnsbl/dnsbl.sock
23 #mv -f $pid.save $pid 32 popd
24 #echo started dnsbl milter as process $P2 33 sleep 5
25 # 34 P2=`cat $pid`
26 #/usr/lib/sendmail -bd -Ctest.cf -Ldnsbl 35 mv -f $pid.save $pid
27 #sleep 5 36 echo started dnsbl milter as process $P2
28 #P3=`head -1 /var/run/sm-test.pid`
29 #echo started sendmail as process $P3
30 #
31 #echo eventually "'"kill -KILL $P2 $P3"'"
32 37
38 /usr/lib/sendmail -bd -Ctest.cf -Ldnsbl
39 sleep 5
40 P3=`head -1 /var/run/sm-test.pid`
41 echo started sendmail as process $P3
42
43 echo eventually "'"kill -KILL $P2 $P3"'"
44