From 5353cbc9a962dc20d2e3962e19af410013b1bc20 Mon Sep 17 00:00:00 2001 From: huangfeng Date: Wed, 25 Sep 2024 16:10:36 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=85=8D=E7=BD=AE=E9=99=84=E4=BB=B6?= =?UTF-8?q?=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ncac/package/cac.conf | 7 ++++++- ncac/setup.sh | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ncac/package/cac.conf b/ncac/package/cac.conf index 2976450..45bfa3c 100644 --- a/ncac/package/cac.conf +++ b/ncac/package/cac.conf @@ -5,11 +5,16 @@ server { proxy_set_header Connection "upgrade"; location / { - root /home/xydl/static; + root /home/xydl/ncac/static; index index.html index.htm; } location /cac-api/ { proxy_pass http://127.0.0.1:8099/; } + + location /data { + alias /home/xydl/ncac/data; + autoindex on; + } } diff --git a/ncac/setup.sh b/ncac/setup.sh index 4229243..804f6b3 100644 --- a/ncac/setup.sh +++ b/ncac/setup.sh @@ -145,7 +145,7 @@ installNewCAC(){ cp package/${APP_NAME}.jar ${CAC_DIR}/ unzip -q package/static.zip -d ${CAC_DIR}/ cp package/cac.conf ${BASE_DIR}/conf/ - sed -i 's#/home/xydl/static#'${CAC_DIR}'/static#g' ${BASE_DIR}/conf/cac.conf + sed -i 's#/home/xydl/ncac#'${CAC_DIR}'#g' ${BASE_DIR}/conf/cac.conf echo ${CAC_DIR}" installed." unzip -qj package/${APP_NAME}.jar BOOT-INF/classes/application-prod.yml -d ${CAC_DIR}/config sleep 1 @@ -153,6 +153,7 @@ installNewCAC(){ sed -i 's/127.0.0.1:3306/'${DB_IP}':'${DB_PORT}'/' ${CAC_DIR}/config/application-prod.yml sed -i 's/username: iec/username: '${DB_USER}'/' ${CAC_DIR}/config/application-prod.yml sed -i 's/password: Iec@1043/password: '${DB_PASS}'/' ${CAC_DIR}/config/application-prod.yml + sed -i 's#/home/xydl/ncac#'${CAC_DIR}'#' ${CAC_DIR}/config/application-prod.yml echo '#!/bin/bash' > ${BIN_DIR}/startCac.sh echo 'if [ -n "$(ps -ef | grep '${APP_NAME}' | grep -v grep | awk '"'"'{print $2}'"'"')" ]; then' >> ${BIN_DIR}/startCac.sh