centralized execution ph1

This commit is contained in:
usmannasir
2019-03-21 23:26:42 +05:00
parent b37907af85
commit 520bd2b797
57 changed files with 813 additions and 679 deletions

View File

@@ -111,7 +111,7 @@ class backupSchedule:
writeToFile = open(backupLogPath, "a")
command = "sudo scp -o StrictHostKeyChecking=no -P "+port+" -i /root/.ssh/cyberpanel " + backupPath + " root@"+IPAddress+":/home/backup/" + ipAddressLocal + "/" + time.strftime("%a-%b") + "/"
subprocess.call(shlex.split(command), stdout=writeToFile)
ProcessUtilities.executioner(shlex.split(command), stdout=writeToFile)
## Remove backups already sent to remote destinations
@@ -162,7 +162,7 @@ class backupSchedule:
command = "sudo ssh -o StrictHostKeyChecking=no -p " + port + " -i /root/.ssh/cyberpanel root@" + ipAddress + " mkdir -p /home/backup/" + ipAddressLocal + "/" + time.strftime(
"%a-%b")
subprocess.call(shlex.split(command))
ProcessUtilities.executioner(shlex.split(command))
pass
for virtualHost in os.listdir("/home"):