lizw 4 years ago
parent
commit
455ac069d0
  1. 16
      yxt/deploy-lims-report.sh

16
yxt/deploy-lims-report.sh

@ -8,6 +8,8 @@ dirPath=~/deploy/yxt_lmis_report
serverName=yxt_lmis_report serverName=yxt_lmis_report
logPath=~/logs/yxt_lmis_report_nohup.log logPath=~/logs/yxt_lmis_report_nohup.log
cmd=$1
profiles=${2:-"hwy"}
echoPrefix="\033[36m+" echoPrefix="\033[36m+"
echoSuffix="\033[0m" echoSuffix="\033[0m"
@ -59,8 +61,8 @@ startServer() {
if [ -z $pid ];then if [ -z $pid ];then
echo -e "$echoPrefix cd $dirPath $echoSuffix" echo -e "$echoPrefix cd $dirPath $echoSuffix"
cd $dirPath cd $dirPath
echo -e "$echoPrefix java $JAVA_MEM_OPTS $DATABASE_OPTS $JAVA_OPTS_EXT -jar ./app-0.0.0-SNAPSHOT.jar --spring.profiles.active=global,hwy --server.port=8086 >$logPath 2>&1 & $echoSuffix" echo -e "$echoPrefix java $JAVA_MEM_OPTS $DATABASE_OPTS $JAVA_OPTS_EXT -jar ./app-0.0.0-SNAPSHOT.jar --spring.profiles.active=global,$profiles --server.port=8086 >$logPath 2>&1 & $echoSuffix"
java $JAVA_MEM_OPTS $DATABASE_OPTS $JAVA_OPTS_EXT -jar ./app-0.0.0-SNAPSHOT.jar --spring.profiles.active=global,hwy --server.port=8086 $logPath 2>&1 & java $JAVA_MEM_OPTS $DATABASE_OPTS $JAVA_OPTS_EXT -jar ./app-0.0.0-SNAPSHOT.jar --spring.profiles.active=global,$profiles --server.port=8086 $logPath 2>&1 &
echo "$serverName 启动成功!" echo "$serverName 启动成功!"
else else
echo "$serverName 正在运行..." echo "$serverName 正在运行..."
@ -104,15 +106,15 @@ logs() {
pid=`ps -ef | grep "DappName=${serverName}" | grep -v 'grep' | awk '{print $2}'` pid=`ps -ef | grep "DappName=${serverName}" | grep -v 'grep' | awk '{print $2}'`
# 操作参数: pull deploy start stop kill log logs # 操作参数: pull deploy start stop kill log logs
if [ "$1" == "pull" ];then if [ "$cmd" == "pull" ];then
deployPull $pid deployPull $pid
elif [ "$1" == "deploy" ];then elif [ "$cmd" == "deploy" ];then
deployServer $pid deployServer $pid
elif [ "$1" == "start" ];then elif [ "$cmd" == "start" ];then
startServer $pid startServer $pid
elif [ "$1" == "stop" ] || [ "$1" == "kill" ];then elif [ "$cmd" == "stop" ] || [ "$cmd" == "kill" ];then
stopServer $pid stopServer $pid
elif [ "$1" == "log" ] || [ "$1" == "logs" ];then elif [ "$cmd" == "log" ] || [ "$cmd" == "logs" ];then
logs logs
else else
if [ -z $pid ];then if [ -z $pid ];then

Loading…
Cancel
Save