Commit e241fb50 authored by hardy's avatar hardy

fix ssh remote access to UE module

parent 03edcdec
......@@ -62,7 +62,7 @@ class Module_UE:
#this method checks if the specified Process is running on the server hosting the module
#if not it will be started
def CheckCMProcess(self):
HOST=self.HostIPAddress
HOST=self.HostUsername+'@'+self.HostIPAddress
COMMAND="ps aux | grep " + self.Process['Name'] + " | grep -v grep "
logging.debug(COMMAND)
ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
......@@ -80,7 +80,7 @@ class Module_UE:
mySSH.close()
#checking the process
time.sleep(5)
HOST=self.HostIPAddress
HOST=self.HostUsername+'@'+self.HostIPAddress
COMMAND="ps aux | grep " + self.Process['Name'] + " | grep -v grep "
logging.debug(COMMAND)
ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
......@@ -104,7 +104,7 @@ class Module_UE:
#this method retrieves the Module IP address (not the Host IP address)
def GetModuleIPAddress(self):
HOST=self.HostIPAddress
HOST=self.HostUsername+'@'+self.HostIPAddress
response= []
tentative = 3
while (len(response)==0) and (tentative>0):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment