Option to choose number of MySQL Instances!

This commit is contained in:
usmannasir
2018-05-29 20:20:05 +05:00
parent 04f89b92d0
commit 659f2014b4
1631 changed files with 418789 additions and 258 deletions

View File

@@ -570,6 +570,7 @@ class backupUtilities:
expectation.append("password:")
expectation.append("Last login")
expectation.append(pexpect.EOF)
expectation.append(pexpect.TIMEOUT)
checkConn = pexpect.spawn("sudo ssh -i /root/.ssh/cyberpanel -o StrictHostKeyChecking=no -p "+ port+" root@"+IPAddress, timeout=3)
index = checkConn.expect(expectation)
@@ -581,11 +582,12 @@ class backupUtilities:
elif index == 1:
subprocess.call(['kill', str(checkConn.pid)])
return [1, "None"]
elif index == 3:
subprocess.call(['kill', str(checkConn.pid)])
return [1, "None"]
else:
subprocess.call(['kill', str(checkConn.pid)])
logging.CyberCPLogFileWriter.writeToFile(
"Remote Server is not able to authenticate for transfer to initiate, IP Address:" + IPAddress)
return [0, "Remote Server is not able to authenticate for transfer to initiate, IP Address:" + IPAddress]
return [1, "None"]
except pexpect.TIMEOUT, msg:
logging.CyberCPLogFileWriter.writeToFile("Timeout "+IPAddress+ " [checkConnection]")