centralized execution ph2

This commit is contained in:
usmannasir
2019-03-26 16:19:03 +05:00
parent 520bd2b797
commit 34410360c7
70 changed files with 2485 additions and 2189 deletions

View File

@@ -24,7 +24,7 @@ class ServerStatusUtil:
@staticmethod
def executioner(command, statusFile):
try:
res = ProcessUtilities.executioner(shlex.split(command), stdout=statusFile, stderr=statusFile)
res = subprocess.call(shlex.split(command), stdout=statusFile, stderr=statusFile)
if res == 1:
return 0
else:
@@ -94,7 +94,7 @@ class ServerStatusUtil:
try:
command = 'chown -R lsadm:lsadm ' + confPath
ProcessUtilities.executioner(shlex.split(command))
subprocess.call(shlex.split(command))
except:
pass
@@ -172,7 +172,7 @@ class ServerStatusUtil:
FNULL = open(os.devnull, 'w')
command = "chown -R " + "lsadm" + ":" + "lsadm" + " " + vhostPath
cmd = shlex.split(command)
ProcessUtilities.executioner(cmd, stdout=FNULL, stderr=subprocess.STDOUT)
subprocess.call(cmd, stdout=FNULL, stderr=subprocess.STDOUT)
except BaseException, msg:
logging.CyberCPLogFileWriter.writeToFile(str(msg))
@@ -209,7 +209,7 @@ class ServerStatusUtil:
FNULL = open(os.devnull, 'w')
command = "chown -R " + "lsadm" + ":" + "lsadm" + " " + vhostPath
cmd = shlex.split(command)
ProcessUtilities.executioner(cmd, stdout=FNULL, stderr=subprocess.STDOUT)
subprocess.call(cmd, stdout=FNULL, stderr=subprocess.STDOUT)
except BaseException, msg:
logging.CyberCPLogFileWriter.writeToFile(str(msg))