Mercurial > dnsbl
annotate test.bash @ 73:2b369f7db7bf
start coding on new config syntax
author | carl |
---|---|
date | Sun, 10 Jul 2005 13:28:33 -0700 |
parents | 390ed250c5d2 |
children | b7449114ebb0 |
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 | |
59
510a511ad554
Add resolver processes to allow better performance on busy machines
carl
parents:
43
diff
changeset
|
43 chmod 700 /var/run/dnsbl |
43 | 44 chown dnsbl:dnsbl /var/run/dnsbl |
0 | 45 mv -f $pid $pid.save |
60
390ed250c5d2
use local unix domain socket for resolver process communication
carl
parents:
59
diff
changeset
|
46 ./dnsbl -d -r /var/run/dnsbl/dnsbl.resolver.sock2 -p local:/var/run/dnsbl/dnsbl.sock2 |
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 |