diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 3b0b9d9e..6003d981 100644 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -24,7 +24,7 @@ export sgzb_modules_material_enable=true export sgzb_auth_jar=sgzb-auth.jar export sgzb_gateway_jar=sgzb-gateway.jar export sgzb_modules_system_jar=sgzb-modules-system.jar -export sgzb_modules_base_jar=sgzb_modules_base.jar +export sgzb_modules_base_jar=sgzb-modules-base.jar export sgzb_modules_file_jar=sgzb-modules-file.jar export sgzb_modules_material_jar=sgzb-modules-material.jar @@ -36,7 +36,6 @@ export sgzb_modules_file_port=9300 export sgzb_modules_material_port=29302 if($auth_service_enable);then - ## 启动authservice echo "--------auth开始启动--------------" echo "--------删除auth开始--------------" P_ID=`ps -ef | grep -w $sgzb_auth_jar | grep -v "grep" | awk '{print $2}'` @@ -76,82 +75,23 @@ if($sgzb_gateway_enable);then echo "--------gateway 启动成功--------------" fi + if($sgzb_modules_system_enable);then - echo "--------sgzb_modules_system service 开始启动--------------" - echo "--------删除 sgzb_modules_system service开始--------------" + echo "--------sgzb_modules_system 开始启动--------------" + echo "--------删除sgzb_modules_system开始--------------" P_ID=`ps -ef | grep -w $sgzb_modules_system_jar | grep -v "grep" | awk '{print $2}'` if [ "$P_ID" == "" ]; then - echo "===sgzb_modules_system service process not exists or stop success" + echo "===sgzb_modules_system process not exists or stop success" else kill -9 $P_ID - echo "sgzb_modules_system service killed success" + echo "sgzb_modules_system killed success" fi nohup /usr/lib/jvm/jdk1.8.0_381/bin/java -jar $sgzb_modules_system_jar >/dev/null 2>&1 & sgzb_modules_system_pid=`lsof -i:$sgzb_modules_system_port|grep "LISTEN"|awk '{print $2}'` until [ -n "$sgzb_modules_system_pid" ] do - sgzb-modules-system_pid=`lsof -i:$sgzb_modules_system_port|grep "LISTEN"|awk '{print $2}'` + sgzb_modules_system_pid=`lsof -i:$sgzb_modules_system_port|grep "LISTEN"|awk '{print $2}'` done - echo "modules sgzb_modules_system pid is $sgzb_modules_system_pid" - echo "--------sgzb_modules_system service 启动成功--------------" -fi - -if($sgzb_modules_base_enable);then - echo "--------sgzb_modules_base service 开始启动--------------" - echo "--------删除 sgzb_modules_base service开始--------------" - P_ID=`ps -ef | grep -w $sgzb_modules_base_jar | grep -v "grep" | awk '{print $2}'` - if [ "$P_ID" == "" ]; then - echo "===sgzb_modules_base service process not exists or stop success" - else - kill -9 $P_ID - echo "sgzb_modules_base service killed success" - fi - nohup /usr/lib/jvm/jdk1.8.0_381/bin/java -jar $sgzb_modules_base_jar >/dev/null 2>&1 & - sgzb_modules_base_pid=`lsof -i:$sgzb_modules_base_port|grep "LISTEN"|awk '{print $2}'` - until [ -n "$sgzb_modules_base_pid" ] - do - sgzb-modules-system_pid=`lsof -i:$sgzb_modules_base_port|grep "LISTEN"|awk '{print $2}'` - done - echo "modules sgzb_modules_base pid is $sgzb_modules_base_pid" - echo "--------sgzb_modules_base service 启动成功--------------" -fi - -if($sgzb_modules_file_enable);then - echo "--------sgzb_modules_file service 开始启动--------------" - echo "--------删除 sgzb_modules_file service开始--------------" - P_ID=`ps -ef | grep -w $sgzb_modules_file_jar | grep -v "grep" | awk '{print $2}'` - if [ "$P_ID" == "" ]; then - echo "===sgzb_modules_file service process not exists or stop success" - else - kill -9 $P_ID - echo "sgzb_modules_file service killed success" - fi - nohup /usr/lib/jvm/jdk1.8.0_381/bin/java -jar $sgzb_modules_file_jar >/dev/null 2>&1 & - sgzb_modules_file_pid=`lsof -i:$sgzb_modules_file_port|grep "LISTEN"|awk '{print $2}'` - until [ -n "$sgzb_modules_file_pid" ] - do - sgzb-modules-system_pid=`lsof -i:$sgzb_modules_file_port|grep "LISTEN"|awk '{print $2}'` - done - echo "modules sgzb_modules_file pid is $sgzb_modules_file_pid" - echo "--------sgzb_modules_file service 启动成功--------------" -fi - -if($sgzb_modules_material_enable);then - echo "--------sgzb_modules_material service 开始启动--------------" - echo "--------删除 sgzb_modules_material service开始--------------" - P_ID=`ps -ef | grep -w $sgzb_modules_material_jar | grep -v "grep" | awk '{print $2}'` - if [ "$P_ID" == "" ]; then - echo "===sgzb_modules_material service process not exists or stop success" - else - kill -9 $P_ID - echo "sgzb_modules_material service killed success" - fi - nohup /usr/lib/jvm/jdk1.8.0_381/bin/java -jar $sgzb_modules_material_jar >/dev/null 2>&1 & - sgzb_modules_material_pid=`lsof -i:$sgzb_modules_material_port|grep "LISTEN"|awk '{print $2}'` - until [ -n "$sgzb_modules_material_pid" ] - do - sgzb-modules-system_pid=`lsof -i:$sgzb_modules_material_port|grep "LISTEN"|awk '{print $2}'` - done - echo "modules sgzb_modules_material pid is $sgzb_modules_material_pid" - echo "--------sgzb_modules_material service 启动成功--------------" + echo "sgzb_modules_system pid is $sgzb_modules_system_pid" + echo "--------sgzb_modules_system 启动成功--------------" fi