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