annotate test.bash @ 12:6ac6d6b822ce stable-2-0

fix memory leak with duplicate url host names, document differences from sendmail.mc feature
author carl
date Fri, 23 Apr 2004 22:45:10 -0700
parents 8c65411cd7ab
children 2752e512fd32
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
96a9758165cd Initial revision
carl
parents:
diff changeset
1 #!/bin/bash
96a9758165cd Initial revision
carl
parents:
diff changeset
2
96a9758165cd Initial revision
carl
parents:
diff changeset
3 g++ -c dnsbl.cpp
8
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
4 if [ $? -ne 0 ]; then
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
5 echo "compiler errors"
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
6 exit
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
7 fi
0
96a9758165cd Initial revision
carl
parents:
diff changeset
8 g++ -o dnsbl dnsbl.o /usr/lib/libresolv.a -lmilter -pthread
8
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
9 if [ $? -ne 0 ]; then
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
10 echo "linker errors"
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
11 exit
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
12 fi
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
13
0
96a9758165cd Initial revision
carl
parents:
diff changeset
14 if [ "$1" == "comp" ]; then
96a9758165cd Initial revision
carl
parents:
diff changeset
15 exit
96a9758165cd Initial revision
carl
parents:
diff changeset
16 fi
96a9758165cd Initial revision
carl
parents:
diff changeset
17
96a9758165cd Initial revision
carl
parents:
diff changeset
18 # build the test.cf file
96a9758165cd Initial revision
carl
parents:
diff changeset
19 make test.cf
96a9758165cd Initial revision
carl
parents:
diff changeset
20
96a9758165cd Initial revision
carl
parents:
diff changeset
21 # start the milter
96a9758165cd Initial revision
carl
parents:
diff changeset
22 pid=/var/run/dnsbl.pid
96a9758165cd Initial revision
carl
parents:
diff changeset
23 echo start the milter
96a9758165cd Initial revision
carl
parents:
diff changeset
24 mkdir -p /var/run/dnsbl
96a9758165cd Initial revision
carl
parents:
diff changeset
25 chmod 700 /var/run/dnsbl
96a9758165cd Initial revision
carl
parents:
diff changeset
26 mv -f $pid $pid.save
96a9758165cd Initial revision
carl
parents:
diff changeset
27 rm -f /var/run/dnsbl/dnsbl.sock
9
8c65411cd7ab integration work on url scanner
carl
parents: 8
diff changeset
28 ./dnsbl -p local:/var/run/dnsbl/dnsbl.sock
8
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
29 sleep 5
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
30 P2=`cat $pid`
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
31 mv -f $pid.save $pid
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
32 echo started dnsbl milter as process $P2
0
96a9758165cd Initial revision
carl
parents:
diff changeset
33
8
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
34 /usr/lib/sendmail -bd -Ctest.cf -Ldnsbl
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
35 sleep 5
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
36 P3=`head -1 /var/run/sm-test.pid`
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
37 echo started sendmail as process $P3
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
38
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
39 echo eventually "'"kill -KILL $P2 $P3"'"
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
40