From 4926dddebb203dc7016bece9e59ac2c33ebd95af Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Wed, 8 Apr 2020 23:14:44 +0800 Subject: [PATCH] fix kill script to avoid others' path with taosdata be killed by mistake. --- tests/script/sh/stop_dnodes.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/script/sh/stop_dnodes.sh b/tests/script/sh/stop_dnodes.sh index acdfbe9e6a..fe4205824a 100755 --- a/tests/script/sh/stop_dnodes.sh +++ b/tests/script/sh/stop_dnodes.sh @@ -6,8 +6,8 @@ if [ -n "$PID" ]; then sudo systemctl stop taosd fi -PID=`ps -ef|grep taosd | grep -v grep | awk '{print $2}'` +PID=`ps -ef|grep -w taosd | grep -v grep | awk '{print $2}'` if [ -n "$PID" ]; then echo sudo kill -9 $PID - sudo kill -9 $PID + sudo pkill taosd fi