add additional logging

This commit is contained in:
Usman Nasir
2021-04-13 01:03:40 +05:00
parent 37e79c60cf
commit c68b08d44a

View File

@@ -576,6 +576,9 @@ $parameters = array(
result = ProcessUtilities.outputExecutioner(command, externalApp)
if os.path.exists(ProcessUtilities.debugPath):
logging.writeToFile(str(result))
if result.find('Success:') == -1:
raise BaseException(result)
@@ -588,6 +591,9 @@ $parameters = array(
command = "wp core config --dbname=" + dbName + " --dbuser=" + dbUser + " --dbpass=" + dbPassword + " --dbhost=%s:%s --dbprefix=wp_ --allow-root --path=" % (ApplicationInstaller.LOCALHOST, ApplicationInstaller.PORT) + finalPath
result = ProcessUtilities.outputExecutioner(command, externalApp)
if os.path.exists(ProcessUtilities.debugPath):
logging.writeToFile(str(result))
if result.find('Success:') == -1:
raise BaseException(result)
@@ -600,6 +606,9 @@ $parameters = array(
command = 'wp core install --url="http://' + finalURL + '" --title="' + blogTitle + '" --admin_user="' + adminUser + '" --admin_password="' + adminPassword + '" --admin_email="' + adminEmail + '" --allow-root --path=' + finalPath
result = ProcessUtilities.outputExecutioner(command, externalApp)
if os.path.exists(ProcessUtilities.debugPath):
logging.writeToFile(str(result))
if result.find('Success:') == -1:
raise BaseException(result)
@@ -612,6 +621,9 @@ $parameters = array(
command = "wp plugin install litespeed-cache --allow-root --path=" + finalPath
result = ProcessUtilities.outputExecutioner(command, externalApp)
if os.path.exists(ProcessUtilities.debugPath):
logging.writeToFile(str(result))
if result.find('Success:') == -1:
raise BaseException(result)
@@ -622,6 +634,9 @@ $parameters = array(
command = "wp plugin activate litespeed-cache --allow-root --path=" + finalPath
result = ProcessUtilities.outputExecutioner(command, externalApp)
if os.path.exists(ProcessUtilities.debugPath):
logging.writeToFile(str(result))
if result.find('Success:') == -1:
raise BaseException(result)
@@ -705,6 +720,7 @@ $parameters = array(
except BaseException as msg:
# remove the downloaded files
if not os.path.exists(ProcessUtilities.debugPath):
from filemanager.filemanager import FileManager
fm = FileManager(None, None)
fm.fixPermissions(self.masterDomain)