From fd8a3935febadf012b54ac9f545611af16363f99 Mon Sep 17 00:00:00 2001 From: Eugene Kim Date: Mon, 19 Aug 2019 17:33:36 -0700 Subject: [PATCH] Only kill processes with matching binary names --- test/kill_node.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/test/kill_node.sh b/test/kill_node.sh index c173ade25..b05e93df0 100755 --- a/test/kill_node.sh +++ b/test/kill_node.sh @@ -1,9 +1,3 @@ #!/bin/bash - -for pid in `/bin/ps -fu $USER| grep "harmony\|txgen\|soldier\|commander\|profiler\|beacon\|bootnode" | grep -v "grep" | grep -v "vi" | awk '{print $2}'`; -do - echo 'Killed process: '$pid - kill -9 $pid -done - +pkill -9 '^(harmony|txgen|soldier|commander|profiler|beacon|bootnode)$' | sed 's/^/Killed process: /' rm -rf db-127.0.0.1-*