1
|
1 #!/bin/bash
|
|
2
|
13
|
3 # build the test.cf file
|
|
4 make -f Makefile.test test.cf
|
1
|
5
|
13
|
6 # start the milter
|
|
7 pid=/var/run/sm-archive.pid
|
|
8 echo start the milter
|
|
9 mkdir -p /var/run/smarchive
|
|
10 chmod 700 /var/run/smarchive
|
|
11 #chown smarchive:smarchive /var/run/smarchive
|
|
12 [ -f "$pid" ] && mv -f $pid $pid.save
|
|
13 valgrind --leak-check=full --show-reachable=yes src/smarchive -d 10 -p local:/var/run/smarchive/smarchive.sock
|
|
14 sleep 5
|
|
15 P2=`cat $pid`
|
|
16 [ -f "$pid.save" ] && mv -f $pid.save $pid
|
|
17 echo started smarchive milter as process $P2
|
1
|
18
|
13
|
19 /usr/lib/sendmail -bd -Ctest.cf -Lsmarchive
|
|
20 sleep 5
|
|
21 P3=`head -1 /var/run/sm-test.pid`
|
|
22 echo started sendmail as process $P3
|
1
|
23
|
13
|
24 echo "eventually, run the following two kill commands"
|
|
25 echo kill -SIGINT $P2
|
|
26 echo kill -KILL $P3
|