Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
M
micro-remote
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
tarak.li
micro-remote
Commits
c5034271
Commit
c5034271
authored
May 28, 2020
by
tarak.li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加商城多次部署处理逻辑
parent
88928a50
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
5 deletions
+6
-5
auto_install.py
server/www/teleport/webroot/app/controller/auto_install.py
+0
-0
clash_refresh.py
server/www/teleport/webroot/app/controller/clash_refresh.py
+0
-2
script.py
server/www/teleport/webroot/app/controller/script.py
+5
-2
plugin.py
server/www/teleport/webroot/app/model/plugin.py
+1
-1
No files found.
server/www/teleport/webroot/app/controller/auto_install.py
View file @
c5034271
This diff is collapsed.
Click to expand it.
server/www/teleport/webroot/app/controller/clash_refresh.py
View file @
c5034271
...
...
@@ -68,8 +68,6 @@ def read_local_ip():
def
update_local_proxy
(
conf
,
local
):
proxy
=
conf
.
get
(
"Proxy"
,
[])
proxys
=
[
item
.
get
(
"name"
,
""
)
for
item
in
proxy
]
print
(
"proxys"
,
proxys
)
print
(
local
)
_local
=
[]
for
k
,
v
in
local
.
items
():
if
k
not
in
proxys
and
len
(
v
.
split
(
":"
))
==
2
:
...
...
server/www/teleport/webroot/app/controller/script.py
View file @
c5034271
...
...
@@ -85,6 +85,9 @@ def auto_install_bt(ip, username, password, site, webname, host_id=0):
print
(
"更新商城信息"
)
update_shop_info
(
site
,
webname
,
host_id
,
status
=
1
,
remark
=
"商城部署成功"
,
url
=
site
)
if
"一键配置商城信息失败"
in
result
:
update_shop_info
(
site
,
webname
,
host_id
,
status
=
3
,
remark
=
"商城部署失败,请重试"
,
url
=
site
)
except
AuthenticationException
as
err
:
update_shop_info
(
site
,
webname
,
host_id
,
status
=
3
,
remark
=
"连接失败,请检查远程信息"
)
finally
:
...
...
@@ -108,6 +111,6 @@ def main():
if
__name__
==
'__main__'
:
# push_file('121.196.33.88', 'root', 'Aa123456')
#
auto_install_bt('121.196.33.88', 'root', 'Aa123456', "www.gingboutrade.com", "测试商城")
auto_install_bt
(
'121.196.33.88'
,
'root'
,
'Aa123456'
,
"www.gingboutrade.com"
,
"测试商城"
)
# update_shop_info(site="www.test.com", webname="测试商城1", test="")
main
()
#
main()
server/www/teleport/webroot/app/model/plugin.py
View file @
c5034271
...
...
@@ -135,7 +135,7 @@ def free_host():
db
=
get_db
()
sql
=
"""select a.id as id
from tp_remote_host a LEFT join tp_remote_account_host_bind b on a.id = b.host_id
where b.id is null"""
where b.id is null
and os_type=1
"""
if
host_id_lock
:
not_id
=
' and a.id not in ({})'
.
format
(
','
.
join
([
str
(
id
)
for
id
in
host_id_lock
.
keys
()]))
...
...
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