annotate test.bash @ 23:37793d4c90a0

changes for rhel7 systemd and /var/run on tmpfs
author Carl Byington <carl@five-ten-sg.com>
date Mon, 06 Feb 2017 10:45:07 -0800
parents 75e1a9bcbc2e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
45c8592d5d13 initial version
carl
parents:
diff changeset
1 #!/bin/bash
45c8592d5d13 initial version
carl
parents:
diff changeset
2
13
75e1a9bcbc2e gpl3, add removal option for original recipients
carl
parents: 1
diff changeset
3 # build the test.cf file
75e1a9bcbc2e gpl3, add removal option for original recipients
carl
parents: 1
diff changeset
4 make -f Makefile.test test.cf
1
45c8592d5d13 initial version
carl
parents:
diff changeset
5
13
75e1a9bcbc2e gpl3, add removal option for original recipients
carl
parents: 1
diff changeset
6 # start the milter
75e1a9bcbc2e gpl3, add removal option for original recipients
carl
parents: 1
diff changeset
7 pid=/var/run/sm-archive.pid
75e1a9bcbc2e gpl3, add removal option for original recipients
carl
parents: 1
diff changeset
8 echo start the milter
75e1a9bcbc2e gpl3, add removal option for original recipients
carl
parents: 1
diff changeset
9 mkdir -p /var/run/smarchive
75e1a9bcbc2e gpl3, add removal option for original recipients
carl
parents: 1
diff changeset
10 chmod 700 /var/run/smarchive
75e1a9bcbc2e gpl3, add removal option for original recipients
carl
parents: 1
diff changeset
11 #chown smarchive:smarchive /var/run/smarchive
75e1a9bcbc2e gpl3, add removal option for original recipients
carl
parents: 1
diff changeset
12 [ -f "$pid" ] && mv -f $pid $pid.save
75e1a9bcbc2e gpl3, add removal option for original recipients
carl
parents: 1
diff changeset
13 valgrind --leak-check=full --show-reachable=yes src/smarchive -d 10 -p local:/var/run/smarchive/smarchive.sock
75e1a9bcbc2e gpl3, add removal option for original recipients
carl
parents: 1
diff changeset
14 sleep 5
75e1a9bcbc2e gpl3, add removal option for original recipients
carl
parents: 1
diff changeset
15 P2=`cat $pid`
75e1a9bcbc2e gpl3, add removal option for original recipients
carl
parents: 1
diff changeset
16 [ -f "$pid.save" ] && mv -f $pid.save $pid
75e1a9bcbc2e gpl3, add removal option for original recipients
carl
parents: 1
diff changeset
17 echo started smarchive milter as process $P2
1
45c8592d5d13 initial version
carl
parents:
diff changeset
18
13
75e1a9bcbc2e gpl3, add removal option for original recipients
carl
parents: 1
diff changeset
19 /usr/lib/sendmail -bd -Ctest.cf -Lsmarchive
75e1a9bcbc2e gpl3, add removal option for original recipients
carl
parents: 1
diff changeset
20 sleep 5
75e1a9bcbc2e gpl3, add removal option for original recipients
carl
parents: 1
diff changeset
21 P3=`head -1 /var/run/sm-test.pid`
75e1a9bcbc2e gpl3, add removal option for original recipients
carl
parents: 1
diff changeset
22 echo started sendmail as process $P3
1
45c8592d5d13 initial version
carl
parents:
diff changeset
23
13
75e1a9bcbc2e gpl3, add removal option for original recipients
carl
parents: 1
diff changeset
24 echo "eventually, run the following two kill commands"
75e1a9bcbc2e gpl3, add removal option for original recipients
carl
parents: 1
diff changeset
25 echo kill -SIGINT $P2
75e1a9bcbc2e gpl3, add removal option for original recipients
carl
parents: 1
diff changeset
26 echo kill -KILL $P3