fix kill script to avoid others' path with taosdata be killed by mistake.

This commit is contained in:
Shuduo Sang 2020-04-08 23:14:44 +08:00
parent 45b90bf909
commit 4926dddebb
1 changed files with 2 additions and 2 deletions

View File

@ -6,8 +6,8 @@ if [ -n "$PID" ]; then
sudo systemctl stop taosd sudo systemctl stop taosd
fi 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 if [ -n "$PID" ]; then
echo sudo kill -9 $PID echo sudo kill -9 $PID
sudo kill -9 $PID sudo pkill taosd
fi fi