From 5b636f2badafb080ae22a6461970faeec319d425 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CGheisMohammadi=E2=80=9D?= <36589218+GheisMohammadi@users.noreply.github.com> Date: Tue, 11 Jul 2023 21:35:05 +0800 Subject: [PATCH] fix kill_node script --- test/kill_node.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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