From 6d9f19f94ca9d61edb7e69f362be0e0669fa98b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E8=B6=85?= <1162714483@qq.com> Date: Fri, 12 Feb 2021 21:40:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=AF=E5=8A=A8=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/config/application.properties | 1 + file-web/src/main/script/start.sh | 14 +++++++------- file-web/src/main/script/stop.sh | 13 +++++++------ 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/file-web/src/main/resources/config/application.properties b/file-web/src/main/resources/config/application.properties index f535fbd..f7aa2fc 100644 --- a/file-web/src/main/resources/config/application.properties +++ b/file-web/src/main/resources/config/application.properties @@ -1,4 +1,5 @@ server.port=8080 + eureka.client.register-with-eureka=false eureka.client.fetchRegistry=false #eureka.client.server.waitTimeInMsWhenSyncEmpty=0 diff --git a/file-web/src/main/script/start.sh b/file-web/src/main/script/start.sh index 3dd5785..e090802 100644 --- a/file-web/src/main/script/start.sh +++ b/file-web/src/main/script/start.sh @@ -1,7 +1,7 @@ #!/bin/bash -. /etc/profile -. ~/.bashrc -. ~/.bash_profile +#. /etc/profile +#. ~/.bashrc +#. ~/.bash_profile #support jsch commons cd `dirname $0` @@ -18,12 +18,12 @@ echo "--------start app ${DEPLOY_DIR}--------" PARENT_DIR=$(dirname "$PWD") CONF_DIR=$DEPLOY_DIR/conf LIB_DIR=$DEPLOY_DIR/lib -SERVER_NAME=`cat $CONF_DIR/config/application.yml | grep -w "name:" | grep -v "#" | awk 'NR==1{print $2}' | tr -d '\r'` -SERVER_PORT=`cat $CONF_DIR/config/application.yml | grep -w "port:" | grep -v "#" | awk 'NR==1{print $2}' | tr -d '\r'` +SERVER_NAME=`cat $CONF_DIR/config/application.properties | grep -w "spring.application.name" | grep -v "#" | awk -F= 'NR==1{print $2}'` +SERVER_PORT=`cat $CONF_DIR/config/application.properties | grep -w "server.port" | grep -v "#" | awk -F= 'NR==1{print $2}'` #REM ********************************************************************************************** -LOG_PATH="/export/log/qiwen-file" -GC_LOG_PATH="/export/log/qiwen-file/gc" +LOG_PATH=$DEPLOY_DIR/log/qiwen-file +GC_LOG_PATH=$DEPLOY_DIR/log/qiwen-file/gc if [ "${LOG_PATH}" == "" ] ; then LOG_PATH=$PARENT_DIR/logs/${SERVER_NAME} fi diff --git a/file-web/src/main/script/stop.sh b/file-web/src/main/script/stop.sh index 96a6d4e..579f057 100644 --- a/file-web/src/main/script/stop.sh +++ b/file-web/src/main/script/stop.sh @@ -1,7 +1,7 @@ #!/bin/bash -. /etc/profile -. ~/.bashrc -. ~/.bash_profile +#. /etc/profile +#. ~/.bashrc +#. ~/.bash_profile #support jsch commons cd `dirname $0` @@ -13,11 +13,12 @@ echo "========stop app ${DEPLOY_DIR}========" PARENT_DIR=$(dirname "$PWD") CONF_DIR=$DEPLOY_DIR/conf LIB_DIR=$DEPLOY_DIR/lib -SERVER_NAME=`cat $CONF_DIR/config/application.yml | grep -w "name:" | grep -v "#" | awk 'NR==1{print $2}' | tr -d '\r'` -SERVER_PORT=`cat $CONF_DIR/config/application.yml | grep -w "port:" | grep -v "#" | awk 'NR==1{print $2}' | tr -d '\r'` +SERVER_NAME=`cat $CONF_DIR/config/application.properties | grep -w "spring.application.name" | grep -v "#" | awk -F= 'NR==1{print $2}'` +SERVER_PORT=`cat $CONF_DIR/config/application.properties | grep -w "server.port" | grep -v "#" | awk -F= 'NR==1{print $2}'` #REM ********************************************************************************************** -LOG_PATH="/export/log/qiwen-file" +LOG_PATH=$DEPLOY_DIR/log/qiwen-file + if [ "${LOG_PATH}" == "" ] ; then LOG_PATH=$PARENT_DIR/logs/${SERVER_NAME} fi