bonus-material.jar

This commit is contained in:
sxu 2024-10-12 17:47:16 +08:00
parent 6a0ce35af5
commit 23f903eaac
1 changed files with 16 additions and 16 deletions

View File

@ -11,27 +11,27 @@ mv ${WORKSPACE}/bonus-modules/bonus-material/target/bonus-material.jar $deploy_p
chmod 777 *.jar chmod 777 *.jar
echo "--------moveFile end--------------" echo "--------moveFile end--------------"
export bonus-material_enable=true export bonus_material_enable=true
export bonus-material_jar=bonus-material.jar export bonus_material_jar=bonus-material.jar
export bonus-material_port=18588 export bonus_material_port=18588
if($bonus-material_enable);then if($bonus_material_enable);then
echo "--------bonus-material 开始启动--------------" echo "--------bonus_material 开始启动--------------"
echo "--------删除bonus-material开始--------------" echo "--------删除bonus__material开始--------------"
P_ID=`ps -ef | grep -w $bonus-material_jar | grep -v "grep" | awk '{print $2}'` P_ID=`ps -ef | grep -w $bonus_material_jar | grep -v "grep" | awk '{print $2}'`
if [ "$P_ID" == "" ]; then if [ "$P_ID" == "" ]; then
echo "===bonus-material process not exists or stop success" echo "===bonus_material process not exists or stop success"
else else
kill -9 $P_ID kill -9 $P_ID
echo "bonus-material killed success" echo "bonus_material killed success"
fi fi
echo "--------bonus-material开始部署--------------" echo "--------bonus_material开始部署--------------"
nohup /usr/lib/jvm/jdk1.8.0_381/bin/java -jar $bonus-material_jar >/dev/null 2>&1 & nohup /usr/lib/jvm/jdk1.8.0_381/bin/java -jar $bonus_material_jar >/dev/null 2>&1 &
bonus-material_pid=`lsof -i:$bonus-material_port|grep "LISTEN"|awk '{print $2}'` bonus_material_pid=`lsof -i:$bonus_material_port|grep "LISTEN"|awk '{print $2}'`
until [ -n "$bonus-material_pid" ] until [ -n "$bonus_material_pid" ]
do do
bonus-material_pid=`lsof -i:$bonus-material_port|grep "LISTEN"|awk '{print $2}'` bonus_material_pid=`lsof -i:$bonus_material_port|grep "LISTEN"|awk '{print $2}'`
done done
echo "bonus-material pid is $bonus-material_pid" echo "bonus_material pid is $bonus_material_pid"
echo "--------bonus-material 启动成功--------------" echo "--------bonus_material 启动成功--------------"
fi fi