From 1fdfb9eef0bb6fd47c45fa6cc604d684481c2997 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B5=B5=E5=95=B8=E9=9D=9E?= <13281114856@qq.com>
Date: Thu, 12 Jan 2023 22:06:32 +0800
Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E5=8C=96=E9=83=A8=E5=88=86=E9=85=8D?=
 =?UTF-8?q?=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 base-manager-ui/admin/.env.production |   5 ++
 base-manager-ui/admin/.env.yibin      |   4 +
 base-manager/pom.xml                  |  18 +---
 base-manager/src/main/bin/deploy.sh   |  82 ++---------------
 portal-manager-ui/admin/.env.yibin    |   2 +-
 portal-manager/pom.xml                |  17 +---
 portal-manager/src/main/bin/deploy.sh | 123 ++------------------------
 smart-gateway/src/main/bin/deploy.sh  |  91 ++-----------------
 8 files changed, 33 insertions(+), 309 deletions(-)
 create mode 100644 base-manager-ui/admin/.env.production
 create mode 100644 base-manager-ui/admin/.env.yibin

diff --git a/base-manager-ui/admin/.env.production b/base-manager-ui/admin/.env.production
new file mode 100644
index 00000000..6429f012
--- /dev/null
+++ b/base-manager-ui/admin/.env.production
@@ -0,0 +1,5 @@
+# 鐢熶骇鐜閰嶇疆
+NODE_ENV = production
+
+VUE_APP_API_BASE_URL=/basics_api
+VUE_APP_API_portal_URL=/portal_home
diff --git a/base-manager-ui/admin/.env.yibin b/base-manager-ui/admin/.env.yibin
new file mode 100644
index 00000000..3ad32c30
--- /dev/null
+++ b/base-manager-ui/admin/.env.yibin
@@ -0,0 +1,4 @@
+#瀹滃鐜
+NODE_ENV = "production"
+VUE_APP_API_BASE_URL=/basics_api
+VUE_APP_API_portal_URL=/portal_home
\ No newline at end of file
diff --git a/base-manager/pom.xml b/base-manager/pom.xml
index 91348b9f..f1d017c6 100644
--- a/base-manager/pom.xml
+++ b/base-manager/pom.xml
@@ -25,10 +25,6 @@
             </activation>
             <properties>
                 <profiles.active>develop</profiles.active>
-                <profiles.server.ip>127.0.0.1</profiles.server.ip>
-                <profiles.server.port>17211</profiles.server.port>
-                <profiles.nginx.port>11071</profiles.nginx.port>
-                <profiles.server.gatewayport>11078</profiles.server.gatewayport>
                 <profiles.server.path>/zwfw</profiles.server.path>
                 <profiles.publish.path>/home/publish</profiles.publish.path>
                 <profiles.rabbitmq.host>127.0.0.1</profiles.rabbitmq.host>
@@ -49,10 +45,6 @@
             <id>test</id>
             <properties>
                 <profiles.active>test</profiles.active>
-                <profiles.server.ip>192.168.0.98</profiles.server.ip>
-                <profiles.server.port>17211</profiles.server.port>
-                <profiles.nginx.port>11071</profiles.nginx.port>
-                <profiles.server.gatewayport>11078</profiles.server.gatewayport>
                 <profiles.server.path>/base</profiles.server.path>
                 <profiles.publish.path>/home/publish</profiles.publish.path>
                 <profiles.rabbitmq.host>192.168.0.98</profiles.rabbitmq.host>
@@ -73,10 +65,6 @@
             <id>product</id>
             <properties>
                 <profiles.active>test</profiles.active>
-                <profiles.server.ip>192.168.0.251</profiles.server.ip>
-                <profiles.server.port>17211</profiles.server.port>
-                <profiles.nginx.port>11071</profiles.nginx.port>
-                <profiles.server.gatewayport>11078</profiles.server.gatewayport>
                 <profiles.server.path>/base</profiles.server.path>
                 <profiles.publish.path>/home/publish</profiles.publish.path>
                 <profiles.rabbitmq.host>192.168.0.251</profiles.rabbitmq.host>
@@ -98,13 +86,9 @@
             <id>yibin</id>
             <properties>
                 <profiles.active>yibin</profiles.active>
-                <profiles.server.ip>192.168.2.144</profiles.server.ip>
-                <profiles.server.port>17211</profiles.server.port>
-                <profiles.nginx.port>11071</profiles.nginx.port>
-                <profiles.server.gatewayport>11078</profiles.server.gatewayport>
                 <profiles.server.path>/base</profiles.server.path>
                 <profiles.publish.path>/home/publish</profiles.publish.path>
-                <profiles.rabbitmq.host>192.168.2.144</profiles.rabbitmq.host>
+                <profiles.rabbitmq.host>127.0.0.1</profiles.rabbitmq.host>
                 <profiles.rabbitmq.port>5672</profiles.rabbitmq.port>
                 <profiles.rabbitmq.username>taxi_mq</profiles.rabbitmq.username>
                 <profiles.rabbitmq.password>admin@2020</profiles.rabbitmq.password>
diff --git a/base-manager/src/main/bin/deploy.sh b/base-manager/src/main/bin/deploy.sh
index 8518ef23..b912a251 100644
--- a/base-manager/src/main/bin/deploy.sh
+++ b/base-manager/src/main/bin/deploy.sh
@@ -10,35 +10,19 @@ LOCK_FILE="/tmp/deploy.lock"
 # 鏃堕棿鍙橀噺
 CDATE=$(date "+%Y-%m-%d")
 CTIME=$(date "+%H:%M:%S")
-PUBLISH_PATH="@profiles.publish.path@"
-PROJECT_NAME="@project.artifactId@"
-IP="@profiles.server.ip@"
-PORT="@profiles.server.port@"
-GATEWAY_PORT="@profiles.server.gatewayport@"
-
 SHELL_LOG="${BASEDIR}/${SHELL_NAME}.log"
 
-SERVICE_PATH="/usr/lib/systemd/system"
 JAVA_HOME="/usr/local/java/jdk1.8"
+SERVICE_PATH="/usr/lib/systemd/system"
+PUBLISH_PATH="@profiles.publish.path@"
+PROJECT_NAME="@project.artifactId@"
 
-NGINX_CONF_PATH="/etc/nginx/conf.d/"
-NGINX_PORT="@profiles.nginx.port@"
-NGINX_SERVER_PATH="@profiles.server.path@"
 PROJECT_EXECPATH="${PUBLISH_PATH}/${PROJECT_NAME}"
 PROJECT_UI_EXECPATH="${PUBLISH_PATH}/${PROJECT_NAME}-ui/dist"
 PROJECT_FILENAME="${PROJECT_NAME}.tar.gz"
 PROJECT_UI_FILENAME="${PROJECT_NAME}-ui.tar.gz"
 PROJECT_SERVICE="${SERVICE_PATH}/${PROJECT_NAME}.service"
-PROJECT_NGINX_CONF="${NGINX_CONF_PATH}/${PROJECT_NAME}.conf"
 
-#鍔犻攣
-shell_lock() {
-  touch ${LOCK_FILE}
-}
-#鍒犻櫎閿�
-shell_unlock() {
-  rm -f ${LOCK_FILE}
-}
 #鍐欐棩蹇�
 writelog() {
   LOGINFO=$1
@@ -54,9 +38,6 @@ clear_deploy() {
   rm -rf ${SERVICE}
   #娓呯悊鎵ц鏂囦欢鐩綍
   rm -rf ${EXECPATH}
-  #娓呯悊nginx鏈嶅姟閰嶇疆鏂囦欢
-  rm -f ${NGINX_CONF_PATH}/${PROJECT_NAME}.conf
-  mkdir -p ${EXECPATH}
 }
 
 #娓呯悊ui
@@ -86,62 +67,14 @@ build_service() {
   writelog "${PROJECT_NAME}鏈嶅姟鍒涘缓瀹屾垚!"
 
 }
-build_nginx() {
-  echo "server{
-        gzip on;
-        gzip_min_length 1k;
-        gzip_buffers 4 16k;
-        #gzip_http_version 1.0;
-        gzip_comp_level 2;
-        gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
-        gzip_vary off;
-        gzip_disable \"MSIE [1-6]\.\";
-        listen ${NGINX_PORT};
-
-        #server_name localhost;
-        location / {
-             root ${PROJECT_UI_EXECPATH};
-             index index.html index.htm;
-        }
-
-        location ${NGINX_SERVER_PATH}/ {
-            proxy_pass http://${IP}:${GATEWAY_PORT};
-            proxy_set_header Host \$host;
-            proxy_set_header X-Real-IP \$remote_addr;
-            proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
-        }
-       location /doc/ {
-           root ${PROJECT_EXECPATH};
-           index  api.html;
-        }
-        location /file/fileupload/ {
-          alias /mortals/app/data/file/fileupload/;
-          autoindex on;
-          autoindex_exact_size off;
-        }
-        location /file/uploadfile/ {
-          alias /mortals/app/data/file/uploadfile/;
-          autoindex on;
-          autoindex_exact_size off;
-        }
-        location /file/preview/ {
-          alias /mortals/app/data/file/preview/;
-          autoindex on;
-          autoindex_exact_size off;
-        }
-    }
-" >${PROJECT_NGINX_CONF}
-}
 
 #鍚姩鏈嶅姟涓巒ginx
-start_service_and_nginx() {
-  writelog "${PROJECT_NAME}鏈嶅姟鍚姩..."
+start_service() {
   systemctl enable ${PROJECT_NAME}
   systemctl daemon-reload
+  writelog "${PROJECT_NAME}鏈嶅姟鍚姩..."
   systemctl stop ${PROJECT_NAME} && systemctl start ${PROJECT_NAME}
   project_status=$(systemctl status "${PROJECT_NAME}"|grep Active |awk '{print $2}')
-  nginx -t
-  nginx -s reload
   jcpid=$(ps -ef | grep -v "grep" | grep "${PROJECT_NAME} " | awk '{print $2}')
   writelog "${PROJECT_NAME}鏈嶅姟鍚姩,PID is ${jcpid} ,status:${project_status}"
 }
@@ -150,11 +83,8 @@ project_deploy() {
   writelog "${PROJECT_NAME}_deploy"
   clear_deploy ${PROJECT_SERVICE} ${PROJECT_EXECPATH}
   writelog "${PROJECT_NAME}_clear_finish"
-
   tar -zvxf ./${PROJECT_FILENAME} -C ${PUBLISH_PATH}
-  build_service ${PROJECT_SERVICE} ${PROJECT_EXECPATH}
-  build_nginx
-  start_service_and_nginx
+  start_service
   writelog "${PROJECT_NAME}_deploy_finish"
 }
 
diff --git a/portal-manager-ui/admin/.env.yibin b/portal-manager-ui/admin/.env.yibin
index 106ba2f3..2069edfc 100644
--- a/portal-manager-ui/admin/.env.yibin
+++ b/portal-manager-ui/admin/.env.yibin
@@ -1,3 +1,3 @@
 #瀹滃鐜
 NODE_ENV = "production"
-VUE_APP_API_BASE_URL=http://192.168.3.24:11078
\ No newline at end of file
+VUE_APP_API_BASE_URL=/basics_api
\ No newline at end of file
diff --git a/portal-manager/pom.xml b/portal-manager/pom.xml
index ce668fff..8ac5f6a3 100644
--- a/portal-manager/pom.xml
+++ b/portal-manager/pom.xml
@@ -22,7 +22,6 @@
 			</activation>
 			<properties>
 				<profiles.active>develop</profiles.active>
-				<profiles.server.port>17212</profiles.server.port>
 				<profiles.queue.type>rabbitmq</profiles.queue.type>
 				<profiles.rabbitmq.host>127.0.0.1</profiles.rabbitmq.host>
 				<profiles.rabbitmq.port>5672</profiles.rabbitmq.port>
@@ -42,10 +41,6 @@
 			<id>test</id>
 			<properties>
 				<profiles.active>test</profiles.active>
-				<profiles.server.ip>192.168.0.98</profiles.server.ip>
-				<profiles.server.port>17212</profiles.server.port>
-				<profiles.nginx.port>11072</profiles.nginx.port>
-				<profiles.server.gatewayport>11078</profiles.server.gatewayport>
 				<profiles.server.path>/zwfw</profiles.server.path>
 				<profiles.publish.path>/home/publish</profiles.publish.path>
 				<profiles.rabbitmq.host>192.168.0.98</profiles.rabbitmq.host>
@@ -57,7 +52,7 @@
 				<profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
 				<profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
 				<profiles.log.level>INFO</profiles.log.level>
-				<profiles.log.path>/mortals/app/logs</profiles.log.path>
+				<profiles.log.path>/home/mortals/app/logs</profiles.log.path>
 				<package.environment>test</package.environment>
 				<skipDeploy>false</skipDeploy>
 			</properties>
@@ -66,10 +61,6 @@
 			<id>product</id>
 			<properties>
 				<profiles.active>product</profiles.active>
-				<profiles.server.ip>192.168.0.251</profiles.server.ip>
-				<profiles.server.port>17212</profiles.server.port>
-				<profiles.nginx.port>11072</profiles.nginx.port>
-				<profiles.server.gatewayport>11078</profiles.server.gatewayport>
 				<profiles.server.path>/zwfw</profiles.server.path>
 				<profiles.publish.path>/home/publish</profiles.publish.path>
 				<profiles.rabbitmq.host>127.0.0.1</profiles.rabbitmq.host>
@@ -91,10 +82,6 @@
 			<id>yibin</id>
 			<properties>
 				<profiles.active>yibin</profiles.active>
-				<profiles.server.ip>192.168.2.144</profiles.server.ip>
-				<profiles.server.port>17212</profiles.server.port>
-				<profiles.nginx.port>11072</profiles.nginx.port>
-				<profiles.server.gatewayport>11078</profiles.server.gatewayport>
 				<profiles.server.path>/zwfw</profiles.server.path>
 				<profiles.publish.path>/home/publish</profiles.publish.path>
 				<profiles.rabbitmq.host>127.0.0.1</profiles.rabbitmq.host>
@@ -106,7 +93,7 @@
 				<profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
 				<profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
 				<profiles.log.level>INFO</profiles.log.level>
-				<profiles.log.path>/mortals/app/logs</profiles.log.path>
+				<profiles.log.path>/home/mortals/app/logs</profiles.log.path>
 				<package.environment>yibin</package.environment>
 				<skipDeploy>false</skipDeploy>
 			</properties>
diff --git a/portal-manager/src/main/bin/deploy.sh b/portal-manager/src/main/bin/deploy.sh
index 9520c4f1..b912a251 100644
--- a/portal-manager/src/main/bin/deploy.sh
+++ b/portal-manager/src/main/bin/deploy.sh
@@ -10,40 +10,19 @@ LOCK_FILE="/tmp/deploy.lock"
 # 鏃堕棿鍙橀噺
 CDATE=$(date "+%Y-%m-%d")
 CTIME=$(date "+%H:%M:%S")
-PUBLISH_PATH="@profiles.publish.path@"
-PROJECT_NAME="@project.artifactId@"
-IP="@profiles.server.ip@"
-PORT="@profiles.server.port@"
-GATEWAY_PORT="@profiles.server.gatewayport@"
-
 SHELL_LOG="${BASEDIR}/${SHELL_NAME}.log"
 
-MYSQL_HOST="127.0.0.1"
-MYSQL_PORT="3306"
-MYSQL_USER="root"
-MYSQL_PASSWORD="xhx@2022"
-
-SERVICE_PATH="/usr/lib/systemd/system"
 JAVA_HOME="/usr/local/java/jdk1.8"
+SERVICE_PATH="/usr/lib/systemd/system"
+PUBLISH_PATH="@profiles.publish.path@"
+PROJECT_NAME="@project.artifactId@"
 
-NGINX_CONF_PATH="/etc/nginx/conf.d/"
-NGINX_PORT="@profiles.nginx.port@"
-NGINX_SERVER_PATH="@profiles.server.path@"
 PROJECT_EXECPATH="${PUBLISH_PATH}/${PROJECT_NAME}"
 PROJECT_UI_EXECPATH="${PUBLISH_PATH}/${PROJECT_NAME}-ui/dist"
 PROJECT_FILENAME="${PROJECT_NAME}.tar.gz"
 PROJECT_UI_FILENAME="${PROJECT_NAME}-ui.tar.gz"
 PROJECT_SERVICE="${SERVICE_PATH}/${PROJECT_NAME}.service"
-PROJECT_NGINX_CONF="${NGINX_CONF_PATH}/${PROJECT_NAME}.conf"
 
-#鍔犻攣
-shell_lock() {
-  touch ${LOCK_FILE}
-}
-#鍒犻櫎閿�
-shell_unlock() {
-  rm -f ${LOCK_FILE}
-}
 #鍐欐棩蹇�
 writelog() {
   LOGINFO=$1
@@ -59,9 +38,6 @@ clear_deploy() {
   rm -rf ${SERVICE}
   #娓呯悊鎵ц鏂囦欢鐩綍
   rm -rf ${EXECPATH}
-  #娓呯悊nginx鏈嶅姟閰嶇疆鏂囦欢
-  rm -f ${NGINX_CONF_PATH}/${PROJECT_NAME}.conf
-  mkdir -p ${EXECPATH}
 }
 
 #娓呯悊ui
@@ -91,62 +67,14 @@ build_service() {
   writelog "${PROJECT_NAME}鏈嶅姟鍒涘缓瀹屾垚!"
 
 }
-build_nginx() {
-  echo "server{
-        gzip on;
-        gzip_min_length 1k;
-        gzip_buffers 4 16k;
-        #gzip_http_version 1.0;
-        gzip_comp_level 2;
-        gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
-        gzip_vary off;
-        gzip_disable \"MSIE [1-6]\.\";
-        listen ${NGINX_PORT};
-
-        #server_name localhost;
-        location / {
-             root ${PROJECT_UI_EXECPATH};
-             index index.html index.htm;
-        }
-
-        location ${NGINX_SERVER_PATH}/ {
-            proxy_pass http://${IP}:${GATEWAY_PORT};
-            proxy_set_header Host \$host;
-            proxy_set_header X-Real-IP \$remote_addr;
-            proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
-        }
-       location /doc/ {
-           root ${PROJECT_EXECPATH};
-           index  api.html;
-        }
-        location /file/fileupload/ {
-          alias /mortals/app/data/file/fileupload/;
-          autoindex on;
-          autoindex_exact_size off;
-        }
-        location /file/uploadfile/ {
-          alias /mortals/app/data/file/uploadfile/;
-          autoindex on;
-          autoindex_exact_size off;
-        }
-        location /file/preview/ {
-          alias /mortals/app/data/file/preview/;
-          autoindex on;
-          autoindex_exact_size off;
-        }
-    }
-" >${PROJECT_NGINX_CONF}
-}
 
 #鍚姩鏈嶅姟涓巒ginx
-start_service_and_nginx() {
-  writelog "${PROJECT_NAME}鏈嶅姟鍚姩..."
+start_service() {
   systemctl enable ${PROJECT_NAME}
   systemctl daemon-reload
+  writelog "${PROJECT_NAME}鏈嶅姟鍚姩..."
   systemctl stop ${PROJECT_NAME} && systemctl start ${PROJECT_NAME}
-  project_status=$(systemctl status "${PROJECT_NAME}" | grep Active | awk '{print $2}')
-  nginx -t
-  nginx -s reload
+  project_status=$(systemctl status "${PROJECT_NAME}"|grep Active |awk '{print $2}')
   jcpid=$(ps -ef | grep -v "grep" | grep "${PROJECT_NAME} " | awk '{print $2}')
   writelog "${PROJECT_NAME}鏈嶅姟鍚姩,PID is ${jcpid} ,status:${project_status}"
 }
@@ -155,11 +83,8 @@ project_deploy() {
   writelog "${PROJECT_NAME}_deploy"
   clear_deploy ${PROJECT_SERVICE} ${PROJECT_EXECPATH}
   writelog "${PROJECT_NAME}_clear_finish"
-
   tar -zvxf ./${PROJECT_FILENAME} -C ${PUBLISH_PATH}
-  build_service ${PROJECT_SERVICE} ${PROJECT_EXECPATH}
-  build_nginx
-  start_service_and_nginx
+  start_service
   writelog "${PROJECT_NAME}_deploy_finish"
 }
 
@@ -169,13 +94,7 @@ project_ui_deploy() {
   clear_ui_deploy ${PROJECT_UI_EXECPATH}
   tar -zvxf ./${PROJECT_UI_FILENAME} -C ${PUBLISH_PATH}
   writelog "${PROJECT_NAME}_ui_deploy_finish"
-}
 
-init_db() {
-  writelog "${PROJECT_NAME}_db_init"
-  mysql -h${MYSQL_HOST} -P${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PASSWORD} <${EXECPATH}/db/db.sql
-  mysql -h${MYSQL_HOST} -P${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PASSWORD} <${EXECPATH}/db/menu.sql
-  writelog "${PROJECT_NAME}_db_init"
 }
 
 #涓诲嚱鏁�
@@ -187,32 +106,4 @@ main() {
   exit ${RETVAL}
 }
 
-init_params(){
-   #鑾峰彇鍙傛暟
-    while getopts h:P:u:p opt; do
-      case $opt in
-      h)
-        #echo "-mysql-host ---- $OPTARG"
-        MYSQL_HOST=$OPTARG
-        ;;
-      P)
-        #echo "-mysql-port ---- $OPTARG"
-        MYSQL_PORT=$OPTARG
-        ;;
-      u)
-        #echo "-mysql-user ---- $OPTARG"
-        MYSQL_USER=$OPTARG
-        ;;
-      p)
-        #echo "-mysql-password ---- $OPTARG"
-        MYSQL_PASSWORD=$OPTARG
-        ;;
-      ?)
-        echo "$opt is an invalid option"
-        ;;
-      esac
-    done
-}
-
-
 main $1
diff --git a/smart-gateway/src/main/bin/deploy.sh b/smart-gateway/src/main/bin/deploy.sh
index 0d2843a3..9e4684de 100644
--- a/smart-gateway/src/main/bin/deploy.sh
+++ b/smart-gateway/src/main/bin/deploy.sh
@@ -10,34 +10,19 @@ LOCK_FILE="/tmp/deploy.lock"
 # 鏃堕棿鍙橀噺
 CDATE=$(date "+%Y-%m-%d")
 CTIME=$(date "+%H:%M:%S")
-PUBLISH_PATH="@profiles.publish.path@"
-PROJECT_NAME="@project.artifactId@"
-IP="@profiles.server.ip@"
-PORT="@profiles.server.port@"
-
 SHELL_LOG="${BASEDIR}/${SHELL_NAME}.log"
 
-SERVICE_PATH="/usr/lib/systemd/system"
 JAVA_HOME="/usr/local/java/jdk1.8"
+SERVICE_PATH="/usr/lib/systemd/system"
+PUBLISH_PATH="@profiles.publish.path@"
+PROJECT_NAME="@project.artifactId@"
 
-NGINX_CONF_PATH="/etc/nginx/conf.d/"
-NGINX_PORT="@profiles.nginx.port@"
-NGINX_SERVER_PATH="@profiles.server.path@"
 PROJECT_EXECPATH="${PUBLISH_PATH}/${PROJECT_NAME}"
-PROJECT_UI_EXECPATH="${PUBLISH_PATH}/${PROJECT_NAME}-ui"
+PROJECT_UI_EXECPATH="${PUBLISH_PATH}/${PROJECT_NAME}-ui/dist"
 PROJECT_FILENAME="${PROJECT_NAME}.tar.gz"
 PROJECT_UI_FILENAME="${PROJECT_NAME}-ui.tar.gz"
 PROJECT_SERVICE="${SERVICE_PATH}/${PROJECT_NAME}.service"
-PROJECT_NGINX_CONF="${NGINX_CONF_PATH}/${PROJECT_NAME}.conf"
 
-#鍔犻攣
-shell_lock() {
-  touch ${LOCK_FILE}
-}
-#鍒犻櫎閿�
-shell_unlock() {
-  rm -f ${LOCK_FILE}
-}
 #鍐欐棩蹇�
 writelog() {
   LOGINFO=$1
@@ -53,16 +38,6 @@ clear_deploy() {
   rm -rf ${SERVICE}
   #娓呯悊鎵ц鏂囦欢鐩綍
   rm -rf ${EXECPATH}
-  #娓呯悊nginx鏈嶅姟閰嶇疆鏂囦欢
-  rm -f ${NGINX_CONF_PATH}/${PROJECT_NAME}.conf
-  mkdir -p ${EXECPATH}
-}
-
-#娓呯悊ui
-clear_ui_deploy() {
-  EXEC_UI_PATH=$1
-  rm -rf ${EXEC_UI_PATH}
-  mkdir -p ${EXEC_UI_PATH}
 }
 
 build_service() {
@@ -85,59 +60,14 @@ build_service() {
   writelog "${PROJECT_NAME}鏈嶅姟鍒涘缓瀹屾垚!"
 
 }
-build_nginx() {
-  echo "server{
-        gzip on;
-        gzip_min_length 1k;
-        gzip_buffers 4 16k;
-        #gzip_http_version 1.0;
-        gzip_comp_level 2;
-        gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
-        gzip_vary off;
-        gzip_disable \"MSIE [1-6]\.\";
-        listen ${NGINX_PORT};
-
-        #server_name localhost;
-
-        location / {
-            proxy_pass http://${IP}:${PORT};
-            proxy_set_header Host \$host;
-            proxy_set_header X-Real-IP \$remote_addr;
-            proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
-        }
-
-         location /homeDeviceUrl/ {
-             alias /home/publish/device-manager-ui/homeDeviceUrl/;
-             index index.html index.htm;
-        }
-        location /file/fileupload/ {
-          alias /mortals/app/data/file/fileupload/;
-          autoindex on;
-          autoindex_exact_size off;
-        }
-        location /file/uploadfile/ {
-          alias /mortals/app/data/file/uploadfile/;
-          autoindex on;
-          autoindex_exact_size off;
-        }
-        location /file/preview/ {
-          alias /mortals/app/data/file/preview/;
-          autoindex on;
-          autoindex_exact_size off;
-        }
-    }
-" >${PROJECT_NGINX_CONF}
-}
 
 #鍚姩鏈嶅姟涓巒ginx
-start_service_and_nginx() {
-  writelog "${PROJECT_NAME}鏈嶅姟鍚姩..."
+start_service() {
   systemctl enable ${PROJECT_NAME}
   systemctl daemon-reload
+  writelog "${PROJECT_NAME}鏈嶅姟鍚姩..."
   systemctl stop ${PROJECT_NAME} && systemctl start ${PROJECT_NAME}
   project_status=$(systemctl status "${PROJECT_NAME}"|grep Active |awk '{print $2}')
-  nginx -t
-  nginx -s reload
   jcpid=$(ps -ef | grep -v "grep" | grep "${PROJECT_NAME} " | awk '{print $2}')
   writelog "${PROJECT_NAME}鏈嶅姟鍚姩,PID is ${jcpid} ,status:${project_status}"
 }
@@ -146,19 +76,12 @@ project_deploy() {
   writelog "${PROJECT_NAME}_deploy"
   clear_deploy ${PROJECT_SERVICE} ${PROJECT_EXECPATH}
   writelog "${PROJECT_NAME}_clear_finish"
-
   tar -zvxf ./${PROJECT_FILENAME} -C ${PUBLISH_PATH}
-  build_service ${PROJECT_SERVICE} ${PROJECT_EXECPATH}
-  writelog "${PROJECT_NAME}_deploy_build_nginx"
-  build_nginx
-  writelog "${PROJECT_NAME}_deploy_build_nginx_finish"
-  writelog "${PROJECT_NAME}_deploy_build_service_finish"
-  start_service_and_nginx
+  start_service
   writelog "${PROJECT_NAME}_deploy_finish"
 }
 
 
-
 #涓诲嚱鏁�
 main() {
   echo "鍚庡彴鏈嶅姟閮ㄧ讲"
-- 
2.24.3