Browse Source

wms8 服务部署

master
lizw 4 years ago
parent
commit
7eaff13e54
  1. 90
      wms8/build.sh

90
wms8/build.sh

@ -121,51 +121,51 @@ buildCode() {
buildCode
echo "###--代码构建完成--------------------------------------------------------------------------###"
echo ""
#
#logPath=/data3/thinkingwms_nohup.log
#dirPath=/data3/yvan-framework/thinkingwms-ui/thinkingwms-backend/build/libs/
#serverName=dsl_thinkingwms_ui
#
#cmd=$1
#profiles=${2:-"test"}
#
##-------------------------------------------------------------------
#JAVA_MEM_OPTS=" -DappName=${serverName} -server -Xmx2g -Xms2g"
#DATABASE_OPTS=" -Ddatabase.codeset=ISO-8859-1 -Ddatabase.logging=false"
#JAVA_OPTS_EXT=" -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Dapplication.codeset=UTF-8 -Dfile.encoding=UTF-8 -Duser.timezone=Asia/Shanghai"
##-------------------------------------------------------------------
#
#startServer() {
# pid=$1
# if [ -z $pid ];then
# echo -e "$echoPrefix cd $dirPath $echoSuffix"
# cd $dirPath
# echo -e "$echoPrefix java $JAVA_MEM_OPTS $DATABASE_OPTS $JAVA_OPTS_EXT -jar ./thinkingwms-backend-0.0.0-SNAPSHOT.jar --spring.profiles.active=global,$profiles >$logPath 2>&1 & $echoSuffix"
# java $JAVA_MEM_OPTS $DATABASE_OPTS $JAVA_OPTS_EXT -jar ./thinkingwms-backend-0.0.0-SNAPSHOT.jar --spring.profiles.active=global,$profiles >$logPath 2>&1 &
# echo "$serverName 启动成功!"
# else
# echo "$serverName 正在运行..."
# fi
# echo "查看日志: tail -F $logPath -n 100"
#}
#
#stopServer() {
# pid=$1
# if [ -z $pid ];then
# echo "$serverName 未运行"
# else
# echo -e "$echoPrefix ps -ef | grep "DappName=${serverName}" | grep -v 'grep' | awk '{print \$2}' | xargs kill $echoSuffix"
# ps -ef | grep "DappName=${serverName}" | grep -v 'grep' | awk '{print $2}' | xargs kill
# echo "$serverName 已停止!"
# fi
#}
#
#pid=`ps -ef | grep "DappName=${serverName}" | grep -v 'grep' | awk '{print $2}'`
#if [ ! -z $pid ];then
# stopServer $pid
# sleep 3s
#fi
#startServer
logPath=/home/www/output/wms8_bench_nohup.log
dirPath=/home/www/deploy/wms8-bench/wms-biz/servo/build/libs/
serverName=wms8_bench
cmd=$1
profiles=${2:-"test"}
#-------------------------------------------------------------------
JAVA_MEM_OPTS=" -DappName=${serverName} -server -Xmx2g -Xms2g"
DATABASE_OPTS=" -Ddatabase.codeset=ISO-8859-1 -Ddatabase.logging=false"
JAVA_OPTS_EXT=" -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Dapplication.codeset=UTF-8 -Dfile.encoding=UTF-8 -Duser.timezone=Asia/Shanghai"
#-------------------------------------------------------------------
startServer() {
pid=$1
if [ -z $pid ];then
echo -e "$echoPrefix cd $dirPath $echoSuffix"
cd $dirPath
echo -e "$echoPrefix java $JAVA_MEM_OPTS $DATABASE_OPTS $JAVA_OPTS_EXT -jar ./servo-0.0.0-SNAPSHOT.jar --spring.profiles.active=global,$profiles >$logPath 2>&1 & $echoSuffix"
java $JAVA_MEM_OPTS $DATABASE_OPTS $JAVA_OPTS_EXT -jar ./servo-0.0.0-SNAPSHOT.jar --spring.profiles.active=global,$profiles >$logPath 2>&1 &
echo "$serverName 启动成功!"
else
echo "$serverName 正在运行..."
fi
echo "查看日志: tail -F $logPath -n 100"
}
stopServer() {
pid=$1
if [ -z $pid ];then
echo "$serverName 未运行"
else
echo -e "$echoPrefix ps -ef | grep "DappName=${serverName}" | grep -v 'grep' | awk '{print \$2}' | xargs kill $echoSuffix"
ps -ef | grep "DappName=${serverName}" | grep -v 'grep' | awk '{print $2}' | xargs kill
echo "$serverName 已停止!"
fi
}
pid=`ps -ef | grep "DappName=${serverName}" | grep -v 'grep' | awk '{print $2}'`
if [ ! -z $pid ];then
stopServer $pid
sleep 3s
fi
startServer
# bash <(curl -s http://git.yvanui.com/lizhiwei/jztd-deploy/raw/master/wms8/build.sh)

Loading…
Cancel
Save