This commit is contained in:
sxu 2024-07-22 14:48:35 +08:00
parent 34da1debcd
commit 03fdd54f92
1 changed files with 12 additions and 7 deletions

View File

@ -58,18 +58,23 @@ fi
if($sgzb_gateway_enable);then
echo "--------gateway 开始启动--------------"
echo "--------删除gateway开始--------------"
P_ID=`ps -ef | grep -w $sgzb_gateway_jar | grep -v "grep" | awk '{print $2}'`
if [ "$P_ID" == "" ]; then
echo "===gateway process not exists or stop success"
else
kill -9 $P_ID
echo "gateway killed success"
fi
P_ID=`ps -ef | grep -w $sgzb_gateway_jar | grep -v "grep" | awk '{print $2}'`
if [ "$P_ID" == "" ]; then
echo "===gateway process not exists or stop success"
else
kill -9 $P_ID
echo "gateway killed success"
fi
echo "--------删除gateway开始2-------------- $sgzb_gateway_port"
nohup /usr/lib/jvm/jdk1.8.0_381/bin/java -jar $sgzb_gateway_jar >/dev/null 2>&1 &
echo "--------删除gateway开始3-------------- $sgzb_gateway_port"
sgzb_gateway_pid=`lsof -i:$sgzb_gateway_port|grep "LISTEN"|awk '{print $2}'`
echo "--------删除gateway开始4-------------- $sgzb_gateway_pid"
until [ -n "$sgzb_gateway_pid" ]
do
echo "--------删除gateway开始5-------------- $sgzb_gateway_pid"
sgzb_gateway_pid=`lsof -i:$sgzb_gateway_port|grep "LISTEN"|awk '{print $2}'`
echo "--------删除gateway开始6-------------- $sgzb_gateway_pid"
done
echo "gateway pid is $sgzb_gateway_pid"
echo "--------gateway 启动成功--------------"