#!/bin/bash
+target=$1
+[ -z "$target" ] && target=ADMLS
+
cd `dirname $0`
-for run in `ls ADMLS/*/run.sh`
+if [ ! -d $target ]
+then
+ echo
+ echo "Directory '$target' missing. Run './configure.sh' first !"
+ echo "(remember that you could provide another target as argument)"
+ echo
+ exit 1
+fi
+
+for run in `ls $target/*/run.sh`
do
- $run
+ cd `dirname $run`
+ instance_name=$(basename $PWD)
+ pkill -9 $instance_name
+ [ $? -eq 0 ] && echo -n "Re-"
+ echo "Starting $instance_name ..."
+ ./run.sh > /dev/null &
+ cd - >/dev/null
done
+echo
+wait $(jobs -p)
+
+sleep 3
+./checkStatus.sh
+
+cat << EOF
+
+
+
+ To stop the processes, you could execute: pgrep ADML-[0-9] | xargs kill
+ Anyway, executing './run.sh' again you will restart the ADML instances.
+
+ Now it's time to './program.sh' the started instances with the desired
+ scenary. There are two programming variants:
+
+ ./program.sh <test stuff directory>
+ ./program.sh dynamic
+
+
+ Done!
+EOF
+
+echo
+