Fix start.sh script due to bad pid calculated
authorEduardo Ramos Testillano (eramedu) <eduardo.ramos.testillano@ericsson.com>
Wed, 29 Apr 2020 16:57:09 +0000 (18:57 +0200)
committerEduardo Ramos Testillano (eramedu) <eduardo.ramos.testillano@ericsson.com>
Wed, 29 Apr 2020 16:57:09 +0000 (18:57 +0200)
The .pid was having the eval process PID instead
of ADML's one.
We must to evaluate first, and then pass arguments
expanded to the ADML executable.

example/diameter/launcher/deployments/adml/start.sh

index faadf1a..b8f2e9f 100755 (executable)
@@ -15,7 +15,8 @@ for file in `ls *.launcher.log 2>/dev/null`; do 0> $file; done
 mkdir -p counters test-reports
 rm -f counters/* test-reports/* *.csv
 export LD_LIBRARY_PATH=$PWD/dynlibs
 mkdir -p counters test-reports
 rm -f counters/* test-reports/* *.csv
 export LD_LIBRARY_PATH=$PWD/dynlibs
-eval ./ADML `grep -v ^# $ARGS` &
+args=$(eval echo $(grep -v ^# $ARGS))
+./ADML ${args} &
 echo $! > .pid
 echo "Done !"
 
 echo $! > .pid
 echo "Done !"