Mercurial > dnsbl
annotate test.bash @ 74:b7449114ebb0
start coding on new config syntax
author | carl |
---|---|
date | Sun, 10 Jul 2005 14:19:00 -0700 |
parents | 390ed250c5d2 |
children | 81f1e400e8ab |
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 # | |
74 | 21 rm -f dnsbl.o scanner.o context.o tokenizer.o |
22 g++ -c -pthread dnsbl.cpp scanner.cpp context.cpp tokenizer.cpp | |
8 | 23 if [ $? -ne 0 ]; then |
24 echo "compiler errors" | |
25 exit | |
26 fi | |
74 | 27 g++ -o dnsbl dnsbl.o scanner.o context.o tokenizer.o /usr/lib/libresolv.a -lmilter -pthread |
8 | 28 if [ $? -ne 0 ]; then |
29 echo "linker errors" | |
30 exit | |
31 fi | |
32 | |
0 | 33 if [ "$1" == "comp" ]; then |
34 exit | |
35 fi | |
36 | |
37 # build the test.cf file | |
38 make test.cf | |
39 | |
40 # start the milter | |
41 pid=/var/run/dnsbl.pid | |
42 echo start the milter | |
43 mkdir -p /var/run/dnsbl | |
59
510a511ad554
Add resolver processes to allow better performance on busy machines
carl
parents:
43
diff
changeset
|
44 chmod 700 /var/run/dnsbl |
43 | 45 chown dnsbl:dnsbl /var/run/dnsbl |
0 | 46 mv -f $pid $pid.save |
60
390ed250c5d2
use local unix domain socket for resolver process communication
carl
parents:
59
diff
changeset
|
47 ./dnsbl -d -r /var/run/dnsbl/dnsbl.resolver.sock2 -p local:/var/run/dnsbl/dnsbl.sock2 |
8 | 48 sleep 5 |
49 P2=`cat $pid` | |
50 mv -f $pid.save $pid | |
51 echo started dnsbl milter as process $P2 | |
0 | 52 |
8 | 53 /usr/lib/sendmail -bd -Ctest.cf -Ldnsbl |
54 sleep 5 | |
55 P3=`head -1 /var/run/sm-test.pid` | |
56 echo started sendmail as process $P3 | |
57 | |
58 echo eventually "'"kill -KILL $P2 $P3"'" | |
59 |