Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
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
ops
jumpserver
Commits
74c3f122
Commit
74c3f122
authored
Jul 26, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 添加脚本,将windows协议改为rdp
parent
ac238aa3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
domain.py
apps/assets/models/domain.py
+1
-1
2018_07_15_set_win_protocol_to_ssh.sh
utils/2018_07_15_set_win_protocol_to_ssh.sh
+9
-0
No files found.
apps/assets/models/domain.py
View file @
74c3f122
...
...
@@ -43,7 +43,7 @@ class Gateway(AssetUser):
ip
=
models
.
GenericIPAddressField
(
max_length
=
32
,
verbose_name
=
_
(
'IP'
),
db_index
=
True
)
port
=
models
.
IntegerField
(
default
=
22
,
verbose_name
=
_
(
'Port'
))
protocol
=
models
.
CharField
(
choices
=
PROTOCOL_CHOICES
,
max_length
=
16
,
default
=
SSH_PROTOCOL
,
verbose_name
=
_
(
"Protocol"
))
domain
=
models
.
ForeignKey
(
Domain
,
verbose_name
=
_
(
"Domain"
))
domain
=
models
.
ForeignKey
(
Domain
,
verbose_name
=
_
(
"Domain"
)
,
on_delete
=
models
.
CASCADE
)
comment
=
models
.
CharField
(
max_length
=
128
,
blank
=
True
,
null
=
True
,
verbose_name
=
_
(
"Comment"
))
is_active
=
models
.
BooleanField
(
default
=
True
,
verbose_name
=
_
(
"Is active"
))
...
...
utils/2018_07_15_set_win_protocol_to_ssh.sh
0 → 100644
View file @
74c3f122
#!/bin/bash
#
python ../apps/manage.py shell
<<
EOF
from assets.models import Asset
Asset.objects.filter(platform__startswith='Win').update(protocol='rdp')
EOF
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