mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-25 12:22:28 +03:00
changed execute command over ssh
This commit is contained in:
parent
b3c08719f9
commit
428791c357
2 changed files with 2 additions and 2 deletions
|
@ -172,7 +172,7 @@ class System:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def received_dir_path():
|
def received_dir_path():
|
||||||
path = '/tmp/.ahenk/'
|
path = '/tmp/' # move this to properties
|
||||||
if Util.is_exist(path) is False:
|
if Util.is_exist(path) is False:
|
||||||
Util.create_directory(path)
|
Util.create_directory(path)
|
||||||
Util.set_permission(path, '777')
|
Util.set_permission(path, '777')
|
||||||
|
|
|
@ -136,7 +136,7 @@ class Util:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if ip:
|
if ip:
|
||||||
command = 'ssh root@{0} "{1}"'.format(ip, command)
|
command = 'ssh root@{0} \'{1}\''.format(ip, command)
|
||||||
|
|
||||||
elif as_user:
|
elif as_user:
|
||||||
command = 'su - {0} -c "{1}"'.format(as_user, command)
|
command = 'su - {0} -c "{1}"'.format(as_user, command)
|
||||||
|
|
Loading…
Reference in a new issue