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