Fixes
[anna.git] / example / diameter / launcher / deployments / st-client / run_all.sh
1 #!/bin/bash
2 cd `dirname $0`
3 if [ ! -d "ADMLS" ]
4 then
5   echo
6   echo "Run './configure.sh' first !"
7   echo
8   exit 1
9 fi
10
11 for run in `ls ADMLS/*/run.sh`
12 do
13   cd `dirname $run`
14   instance_name=$(basename $PWD)
15   pkill -9 $instance_name
16   [ $? -eq 0 ] && echo -n "Re-" 
17   echo "Starting $instance_name ..."
18   ./run.sh > /dev/null &
19   cd - >/dev/null
20 done
21 echo
22 wait $(jobs -p)
23
24 sleep 3
25 ./checkStatus.sh
26
27 cat << EOF
28
29
30
31      To stop the processes, you could execute: pgrep ADML-[0-9] | xargs kill
32      Anyway, executing './run.sh' again you will restart the ADML instances.
33
34      Now it's time to './program.sh' the started instances with the desired
35      scenary. There are two programming variants:
36
37           ./program.sh <test stuff directory>
38           ./program.sh dynamic
39
40
41      Done!
42 EOF
43
44 echo
45