Mercurial > dnsbl
annotate test.bash @ 58:7bb8bbf79285
changes to handle 5iantlavalamp.com
author | carl |
---|---|
date | Thu, 28 Oct 2004 22:54:34 -0700 |
parents | acbe44bbba22 |
children | 510a511ad554 |
rev | line source |
---|---|
0 | 1 #!/bin/bash |
2 | |
14 | 3 ############################ |
4 ## compile and run the test program | |
5 ## | |
6 #g++ -c test.cpp | |
7 #if [ $? -ne 0 ]; then | |
8 # echo "compiler errors" | |
9 # exit | |
10 #fi | |
11 #g++ -o test test.o -pthread | |
12 #if [ $? -ne 0 ]; then | |
13 # echo "linker errors" | |
14 # exit | |
15 #fi | |
13 | 16 |
17 | |
18 ########################### | |
19 # compile the milter | |
20 # | |
37
ccf2c2651c1d
add -pthread compiler option, fix error in scanning for end of html comment
carl
parents:
16
diff
changeset
|
21 g++ -c -pthread dnsbl.cpp |
8 | 22 if [ $? -ne 0 ]; then |
23 echo "compiler errors" | |
24 exit | |
25 fi | |
0 | 26 g++ -o dnsbl dnsbl.o /usr/lib/libresolv.a -lmilter -pthread |
8 | 27 if [ $? -ne 0 ]; then |
28 echo "linker errors" | |
29 exit | |
30 fi | |
31 | |
0 | 32 if [ "$1" == "comp" ]; then |
33 exit | |
34 fi | |
35 | |
36 # build the test.cf file | |
37 make test.cf | |
38 | |
39 # start the milter | |
40 pid=/var/run/dnsbl.pid | |
41 echo start the milter | |
42 mkdir -p /var/run/dnsbl | |
43 | 43 chmod 750 /var/run/dnsbl |
44 chown dnsbl:dnsbl /var/run/dnsbl | |
0 | 45 mv -f $pid $pid.save |
16 | 46 ./dnsbl -d -p local:/var/run/dnsbl/dnsbl.sock |
8 | 47 sleep 5 |
48 P2=`cat $pid` | |
49 mv -f $pid.save $pid | |
50 echo started dnsbl milter as process $P2 | |
0 | 51 |
8 | 52 /usr/lib/sendmail -bd -Ctest.cf -Ldnsbl |
53 sleep 5 | |
54 P3=`head -1 /var/run/sm-test.pid` | |
55 echo started sendmail as process $P3 | |
56 | |
57 echo eventually "'"kill -KILL $P2 $P3"'" | |
58 |