diff options
-rwxr-xr-x | leap-platform-test | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/leap-platform-test b/leap-platform-test index ff2b582..d93badb 100755 --- a/leap-platform-test +++ b/leap-platform-test @@ -348,15 +348,12 @@ else nodes=$nodelist fi -# check if another process is already running with same config file -procs=`pgrep -fl 'leap-platform-test.*-c.*/etc/leap/rewire_develop.cfg'|grep -v -i screen|wc -l` - -if [ $procs -gt 2 ]; then - echo "Other process(es) found running for config $config - exiting." +if [[ "`pidof -x $(basename $0) -o %PPID`" ]] +then + echo "Other process(es) found running for $(basename $0) - exiting." exit 1 fi - case $cmd in add_nodes) add_nodes "$nodes";; bootstrap) bootstrap_nodes "$nodes";; |