This repository has been archived on 2025-03-01. You can view files and clone it, but cannot push or open issues or pull requests.
Bonus-Cloud-Smart-Canteen/scripts_244/kill-ps.sh

130 lines
3.1 KiB
Bash
Raw Permalink Normal View History

2025-02-10 12:42:18 +08:00
AUTH_RESOURCE_NAME=bonus-auth-24.10.0-SNAPSHOT-smart-canteen.jar
GATEWAY_RESOURCE_NAME=bonus-gateway-24.10.0-SNAPSHOT-smart-canteen.jar
SYS_RESOURCE_NAME=bonus-system-24.10.0-SNAPSHOT-smart-canteen.jar
JOB_RESOURCE_NAME=bonus-job-24.10.0-SNAPSHOT-smart-canteen.jar
FILE_RESOURCE_NAME=bonus-file-24.10.0-SNAPSHOT-smart-canteen.jar
MONITOR_RESOURCE_NAME=bonus-visual-monitor-24.10.0-SNAPSHOT-smart-canteen.jar
SMART_CANTEEN_RESOURCE_NAME=bonus-smart-canteen.jar
BONUS_CUST_AUTH_RESOURCE_NAME=bonus-cust-auth.jar
2025-01-23 16:18:40 +08:00
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
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
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
tpid=`ps -ef|grep $JOB_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 $JOB_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
tpid=`ps -ef|grep $FILE_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 $FILE_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
tpid=`ps -ef|grep $MONITOR_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 $MONITOR_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
2025-02-10 12:42:18 +08:00
tpid=`ps -ef|grep $SMART_CANTEEN_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
2025-01-23 16:18:40 +08:00
if [ ${tpid} ]; then
echo 'Stop Process...'
kill -15 $tpid
fi
sleep 5
2025-02-10 12:42:18 +08:00
tpid=`ps -ef|grep $SMART_CANTEEN_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
tpid=`ps -ef|grep $BONUS_CUST_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 $BONUS_CUST_AUTH_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
2025-01-23 16:18:40 +08:00
if [ ${tpid} ]; then
echo 'Kill Process!'
kill -9 $tpid
else
echo 'Stop Success!'
fi