annotate test.bash @ 0:96a9758165cd original

Initial revision
author carl
date Tue, 20 Apr 2004 20:02:29 -0700
parents
children 15a7e942adec
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
96a9758165cd Initial revision
carl
parents:
diff changeset
4 g++ -o dnsbl dnsbl.o /usr/lib/libresolv.a -lmilter -pthread
96a9758165cd Initial revision
carl
parents:
diff changeset
5 if [ "$1" == "comp" ]; then
96a9758165cd Initial revision
carl
parents:
diff changeset
6 exit
96a9758165cd Initial revision
carl
parents:
diff changeset
7 fi
96a9758165cd Initial revision
carl
parents:
diff changeset
8
96a9758165cd Initial revision
carl
parents:
diff changeset
9 # build the test.cf file
96a9758165cd Initial revision
carl
parents:
diff changeset
10 make test.cf
96a9758165cd Initial revision
carl
parents:
diff changeset
11
96a9758165cd Initial revision
carl
parents:
diff changeset
12 # start the milter
96a9758165cd Initial revision
carl
parents:
diff changeset
13 pid=/var/run/dnsbl.pid
96a9758165cd Initial revision
carl
parents:
diff changeset
14 echo start the milter
96a9758165cd Initial revision
carl
parents:
diff changeset
15 mkdir -p /var/run/dnsbl
96a9758165cd Initial revision
carl
parents:
diff changeset
16 chmod 700 /var/run/dnsbl
96a9758165cd Initial revision
carl
parents:
diff changeset
17 mv -f $pid $pid.save
96a9758165cd Initial revision
carl
parents:
diff changeset
18 rm -f /var/run/dnsbl/dnsbl.sock
96a9758165cd Initial revision
carl
parents:
diff changeset
19 ./dnsbl -p local:/var/run/dnsbl/dnsbl.sock &
96a9758165cd Initial revision
carl
parents:
diff changeset
20 sleep 5
96a9758165cd Initial revision
carl
parents:
diff changeset
21 P2=`cat $pid`
96a9758165cd Initial revision
carl
parents:
diff changeset
22 mv -f $pid.save $pid
96a9758165cd Initial revision
carl
parents:
diff changeset
23 echo started dnsbl milter as process $P2
96a9758165cd Initial revision
carl
parents:
diff changeset
24
96a9758165cd Initial revision
carl
parents:
diff changeset
25 /usr/lib/sendmail -bd -Ctest.cf -Ldnsbl
96a9758165cd Initial revision
carl
parents:
diff changeset
26 sleep 5
96a9758165cd Initial revision
carl
parents:
diff changeset
27 P3=`head -1 /var/run/sm-test.pid`
96a9758165cd Initial revision
carl
parents:
diff changeset
28 echo started sendmail as process $P3
96a9758165cd Initial revision
carl
parents:
diff changeset
29
96a9758165cd Initial revision
carl
parents:
diff changeset
30 echo eventually "'"kill -KILL $P2 $P3"'"
96a9758165cd Initial revision
carl
parents:
diff changeset
31