Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
I
install.api
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Script
install.api
Commits
20e5f79a
Commit
20e5f79a
authored
Mar 31, 2020
by
金凯强
🎨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nginx配置修改
parent
ce8de9c3
Pipeline
#28942
canceled with stage
in 0 seconds
Changes
2
Pipelines
3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
4 deletions
+27
-4
load.sh
static_file/system_file/load.sh
+4
-4
load_handle.py
static_file/system_file/load_handle.py
+23
-0
No files found.
static_file/system_file/load.sh
View file @
20e5f79a
...
@@ -6,10 +6,10 @@ now_time=`date +%Y%m%d_%H%M%S`
...
@@ -6,10 +6,10 @@ now_time=`date +%Y%m%d_%H%M%S`
python
-u
load_handle.py
>
${
now_time
}
.log
python
-u
load_handle.py
>
${
now_time
}
.log
sleep
3
#
sleep 3
python
-u
analysis_file_to_hsright.py
#
python -u analysis_file_to_hsright.py
sleep
3
#
sleep 3
python
-u
analysis_file_to_nginx.py
# python -u analysis_file_to_nginx.py
\ No newline at end of file
\ No newline at end of file
static_file/system_file/load_handle.py
View file @
20e5f79a
...
@@ -4,6 +4,29 @@ import os
...
@@ -4,6 +4,29 @@ import os
import
re
import
re
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
# 同步配置nginx配置
app_conf_path
=
'/huansi/upgrade/app.conf'
rpc_conf_path
=
'/huansi/upgrade/rpc.conf'
os
.
system
(
'mkdir -p /data/nginx/conf/'
)
if
os
.
path
.
exists
(
app_conf_path
):
with
open
(
app_conf_path
,
'r'
)
as
f
:
app_conf_content
=
f
.
read
()
app_conf_content
=
app_conf_content
.
replace
(
'$service_ip'
,
'172.17.0.1'
)
with
open
(
'/data/nginx/conf/app.conf'
,
'w'
)
as
f
:
f
.
write
(
app_conf_content
)
if
os
.
path
.
exists
(
rpc_conf_path
):
with
open
(
rpc_conf_path
,
'r'
)
as
f
:
rpc_conf_content
=
f
.
read
()
rpc_conf_content
=
rpc_conf_content
.
replace
(
'$service_ip'
,
'172.17.0.1'
)
with
open
(
'/data/nginx/conf/rpc.conf'
,
'w'
)
as
f
:
f
.
write
(
rpc_conf_content
)
with
os
.
popen
(
'ls | grep .tar'
)
as
f
:
with
os
.
popen
(
'ls | grep .tar'
)
as
f
:
cmd_txt
=
f
.
read
()
cmd_txt
=
f
.
read
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment