-
#!/bin/bash
-
PID=$(cat /tmp/sa.pid)
-
kill -9 $PID
-
PID=$(sudo netstat -npl | awk '/:8070/' | awk -F "[ /]+" '{print $7; exit}')
-
kill -9 $PID
-
pid=$(ps -ef | grep java | grep "video_agent-" | awk '{print $2}')
-
if [ -z "$pid" ] ; then
-
echo "jar is not running"
-
else
-
kill -9 $pid
-
fi
其实使用一行解决
lsof -nti:8070 |xargs kill -9
阅读(556) | 评论(0) | 转发(0) |