diff --git a/test/kill_node.sh b/test/kill_node.sh index 569a40947..1f6f200e1 100755 --- a/test/kill_node.sh +++ b/test/kill_node.sh @@ -1,3 +1,11 @@ #!/bin/bash -pkill -9 '^(harmony|soldier|commander|profiler|bootnode)$' | sed 's/^/Killed process: /' -rm -rf db-127.0.0.1-* + +# list of process name to be killed +targetProcess=( "harmony" "bootnode" "soldier" "commander" "profiler" ) + +for pname in "${targetProcess[@]}" +do + sudo pkill -9 -e "^(${pname})$" +done + +rm -rf db-127.0.0.1-* \ No newline at end of file