Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
agent
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
7
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e72cd95e
authored
Jun 05, 2014
by
Bach Dániel
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add new tasks
parent
e7d693b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
agent.py
+41
-0
No files found.
agent.py
View file @
e72cd95e
...
...
@@ -142,6 +142,47 @@ class Context(object):
r'
%
s.bat'
%
username
,
'w'
)
as
f
:
f
.
write
(
data
)
@staticmethod
def
cleanup
():
if
system
==
'Linux'
:
filelist
=
(
'/root/.bash_history'
'/home/cloud/.bash_history'
'/root/.ssh'
'/home/cloud/.ssh'
)
for
f
in
filelist
:
rmtree
(
f
,
ignore_errors
=
True
)
elif
system
==
'Windows'
:
# TODO
pass
@staticmethod
def
start_access_server
():
if
system
==
'Linux'
:
subprocess
.
call
((
'/sbin/start'
,
'ssh'
))
elif
system
==
'Windows'
:
# TODO
pass
@staticmethod
def
ipaddresses
():
import
netifaces
args
=
{}
interfaces
=
netifaces
.
interfaces
()
for
i
in
interfaces
:
if
i
==
'lo'
:
continue
args
[
i
]
=
[]
addresses
=
netifaces
.
ifaddresses
(
i
)
args
[
i
]
=
([
x
[
'addr'
]
for
x
in
addresses
.
get
(
netifaces
.
AF_INET
,
[])]
+
[
x
[
'addr'
]
for
x
in
addresses
.
get
(
netifaces
.
AF_INET6
,
[])
if
'
%
'
not
in
x
[
'addr'
]])
return
args
class
SerialLineReceiver
(
SerialLineReceiverBase
):
def
connectionMade
(
self
):
...
...
Őry Máté
@orymate
mentioned in issue
#2 (closed)
Jun 07, 2014
mentioned in issue
#2 (closed)
mentioned in issue #2
Toggle commit list
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