From 3a6d7ccf2757d88004d1d7d99d427d0d51eec8fc Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Wed, 21 Aug 2024 18:39:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=92=E8=89=B2=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/kill-nw.sh | 66 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 scripts/kill-nw.sh diff --git a/scripts/kill-nw.sh b/scripts/kill-nw.sh new file mode 100644 index 0000000..1e7cd9c --- /dev/null +++ b/scripts/kill-nw.sh @@ -0,0 +1,66 @@ +AUTH_RESOURCE_NAME=sgzb-auth-nw24.8.3.jar + +tpid=`ps -ef|grep $AUTH_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'` +if [ ${tpid} ]; then +echo 'Stop Process...' +kill -15 $tpid +fi +sleep 5 +tpid=`ps -ef|grep $AUTH_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'` +if [ ${tpid} ]; then +echo 'Kill Process!' +kill -9 $tpid +else +echo 'Stop Success!' +fi + + +GATEWAY_RESOURCE_NAME=sgzb-gateway-nw24.8.3.jar + +tpid=`ps -ef|grep $GATEWAY_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'` +if [ ${tpid} ]; then +echo 'Stop Process...' +kill -15 $tpid +fi +sleep 5 +tpid=`ps -ef|grep $GATEWAY_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'` +if [ ${tpid} ]; then +echo 'Kill Process!' +kill -9 $tpid +else +echo 'Stop Success!' +fi + + +MA_RESOURCE_NAME=sgzb-modules-material-nw24.8.3.jar + +tpid=`ps -ef|grep $MA_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'` +if [ ${tpid} ]; then +echo 'Stop Process...' +kill -15 $tpid +fi +sleep 5 +tpid=`ps -ef|grep $MA_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'` +if [ ${tpid} ]; then +echo 'Kill Process!' +kill -9 $tpid +else +echo 'Stop Success!' +fi + +SYS_RESOURCE_NAME=sgzb-modules-system-nw24.8.3.jar + +tpid=`ps -ef|grep $SYS_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'` +if [ ${tpid} ]; then +echo 'Stop Process...' +kill -15 $tpid +fi +sleep 5 +tpid=`ps -ef|grep $SYS_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'` +if [ ${tpid} ]; then +echo 'Kill Process!' +kill -9 $tpid +else +echo 'Stop Success!' +fi +