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