Commit fdf8b45a authored by 赵啸非's avatar 赵啸非

修改门户配置打包

parent ce56c7d8
...@@ -410,13 +410,13 @@ start_service_and_nginx() { ...@@ -410,13 +410,13 @@ start_service_and_nginx() {
PROJECT_NAME=$1 PROJECT_NAME=$1
systemctl enable ${PROJECT_NAME} systemctl enable ${PROJECT_NAME}
systemctl daemon-reload systemctl daemon-reload
systemctl start ${PROJECT_NAME} systemctl stop ${PROJECT_NAME} && systemctl start ${PROJECT_NAME}
cd ${NGINX_CONF_PATH} project_status=$(systemctl status "${PROJECT_NAME}" | grep Active | awk '{print $2}')
cp -a ${BASEDIR}/release/conf/${PROJECT_NAME}.conf ${PROJECT_NAME}.conf cp -a ${BASEDIR}/release/conf/${PROJECT_NAME}.conf ${NGINX_CONF_PATH}/${PROJECT_NAME}.conf
nginx -t nginx -t
nginx -s reload nginx -s reload
jcpid=$(ps -ef | grep -v "grep" | grep "${PROJECT_NAME} " | awk '{print $2}') jcpid=$(ps -ef | grep -v "grep" | grep "${PROJECT_NAME} " | awk '{print $2}')
writelog "${PROJECT_NAME}服务启动,PID is ${jcpid}" writelog "${PROJECT_NAME}服务启动,PID is ${jcpid} ,status:${project_status}"
} }
nacos_deploy() { nacos_deploy() {
...@@ -448,7 +448,8 @@ nacos_deploy() { ...@@ -448,7 +448,8 @@ nacos_deploy() {
writelog "NACOS_SERVICE服务启动!" writelog "NACOS_SERVICE服务启动!"
systemctl enable ${NACOS} systemctl enable ${NACOS}
systemctl daemon-reload systemctl daemon-reload
systemctl start ${NACOS} systemctl stop ${NACOS} && systemctl start ${NACOS}
project_status=$(systemctl status "${PROJECT_NAME}" | grep Active | awk '{print $2}')
jcpid=$(ps -ef | grep -v "grep" | grep "${NACOS} " | awk '{print $2}') jcpid=$(ps -ef | grep -v "grep" | grep "${NACOS} " | awk '{print $2}')
writelog "${NACOS}服务启动!pid=${jcpid}" writelog "${NACOS}服务启动!pid=${jcpid}"
} }
...@@ -737,7 +738,7 @@ main() { ...@@ -737,7 +738,7 @@ main() {
echo "Deploy is running" && exit echo "Deploy is running" && exit
fi fi
#获取参数 #获取参数
while getopts h:P:u:p opt; do while getopts h:P:u:p opt; do
case $opt in case $opt in
h) h)
#echo "-mysql-host ---- $OPTARG" #echo "-mysql-host ---- $OPTARG"
......
...@@ -138,12 +138,12 @@ start_service_and_nginx() { ...@@ -138,12 +138,12 @@ start_service_and_nginx() {
writelog "${PROJECT_NAME}服务启动..." writelog "${PROJECT_NAME}服务启动..."
systemctl enable ${PROJECT_NAME} systemctl enable ${PROJECT_NAME}
systemctl daemon-reload systemctl daemon-reload
systemctl stop ${PROJECT_NAME} systemctl stop ${PROJECT_NAME} && systemctl start ${PROJECT_NAME}
systemctl start ${PROJECT_NAME} project_status=$(systemctl status "${PROJECT_NAME}"|grep Active |awk '{print $2}')
nginx -t nginx -t
nginx -s reload nginx -s reload
jcpid=$(ps -ef | grep -v "grep" | grep "${PROJECT_NAME} " | awk '{print $2}') jcpid=$(ps -ef | grep -v "grep" | grep "${PROJECT_NAME} " | awk '{print $2}')
writelog "${PROJECT_NAME}服务启动,PID is ${jcpid}" writelog "${PROJECT_NAME}服务启动,PID is ${jcpid} ,status:${project_status}"
} }
#部署后台服务 #部署后台服务
project_deploy() { project_deploy() {
......
...@@ -131,17 +131,15 @@ build_nginx() { ...@@ -131,17 +131,15 @@ build_nginx() {
#启动服务与nginx #启动服务与nginx
start_service_and_nginx() { start_service_and_nginx() {
writelog "${PROJECT_NAME}服务启动..."
systemctl enable ${PROJECT_NAME} systemctl enable ${PROJECT_NAME}
systemctl daemon-reload systemctl daemon-reload
writelog "${PROJECT_NAME}服务停止..." systemctl stop ${PROJECT_NAME} && systemctl start ${PROJECT_NAME}
systemctl stop ${PROJECT_NAME} project_status=$(systemctl status "${PROJECT_NAME}"|grep Active |awk '{print $2}')
writelog "${PROJECT_NAME}服务停止成功!"
writelog "${PROJECT_NAME}服务启动..."
systemctl start ${PROJECT_NAME}
nginx -t nginx -t
nginx -s reload nginx -s reload
jcpid=$(ps -ef | grep -v "grep" | grep "${PROJECT_NAME} " | awk '{print $2}') jcpid=$(ps -ef | grep -v "grep" | grep "${PROJECT_NAME} " | awk '{print $2}')
writelog "${PROJECT_NAME}服务启动,PID is ${jcpid}" writelog "${PROJECT_NAME}服务启动,PID is ${jcpid} ,status:${project_status}"
} }
#部署后台服务 #部署后台服务
project_deploy() { project_deploy() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment