Support for Multiple Peer deployments. Support for coexisting several ADMLS instances...
[anna.git] / example / diameter / launcher / deployments / st-client / run_all.sh
index 489855c..58a68bf 100755 (executable)
@@ -1,18 +1,22 @@
 #!/bin/bash
+target=$1
+[ -z "$target" ] && target=ADMLS
+
 cd `dirname $0`
-if [ ! -d "ADMLS" ]
+if [ ! -d $target ]
 then
   echo
-  echo "Run './configure.sh' first !"
+  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 ADMLS/*/run.sh`
+for run in `ls $target/*/run.sh`
 do
   cd `dirname $run`
   instance_name=$(basename $PWD)
-  pkill $instance_name
+  pkill -9 $instance_name
   [ $? -eq 0 ] && echo -n "Re-" 
   echo "Starting $instance_name ..."
   ./run.sh > /dev/null &
@@ -25,8 +29,8 @@ sleep 3
 ./checkStatus.sh
 
 cat << EOF
-     $(pgrep ADML- | wc -l) instances alive !
-     $(netstat -a | grep :diameter | grep ESTABLISHED | wc -l) connections established !
+
+
 
      To stop the processes, you could execute: pgrep ADML-[0-9] | xargs kill
      Anyway, executing './run.sh' again you will restart the ADML instances.