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 +