mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 22:06:05 +01:00
bug fix: remote extra logging from application installer
This commit is contained in:
@@ -106,7 +106,5 @@ Subject: %s
|
|||||||
statusFile = open(tempStatusPath, 'a')
|
statusFile = open(tempStatusPath, 'a')
|
||||||
statusFile.writelines(mesg + '\n')
|
statusFile.writelines(mesg + '\n')
|
||||||
statusFile.close()
|
statusFile.close()
|
||||||
print((mesg + '\n'))
|
|
||||||
except BaseException as msg:
|
except BaseException as msg:
|
||||||
CyberCPLogFileWriter.writeToFile(str(msg) + ' [statusWriter]')
|
CyberCPLogFileWriter.writeToFile(str(msg) + ' [statusWriter]')
|
||||||
#print str(msg)
|
|
||||||
@@ -899,16 +899,23 @@ $parameters = array(
|
|||||||
if self.dataLossCheck(finalPath, tempStatusPath) == 0:
|
if self.dataLossCheck(finalPath, tempStatusPath) == 0:
|
||||||
raise BaseException('Directory is not empty.')
|
raise BaseException('Directory is not empty.')
|
||||||
|
|
||||||
command = 'composer global require joomlatools/console'
|
|
||||||
ProcessUtilities.outputExecutioner(command, externalApp, None, self.permPath)
|
|
||||||
|
|
||||||
### Decide joomla console path
|
### Decide joomla console path
|
||||||
import getpass
|
import getpass
|
||||||
|
|
||||||
if getpass.getuser() == 'root':
|
if getpass.getuser() == 'root':
|
||||||
|
command = 'export COMPOSER_ALLOW_SUPERUSER=1;composer global require joomlatools/console'
|
||||||
|
ProcessUtilities.outputExecutioner(command, externalApp, None, self.permPath)
|
||||||
joomlaPath = '/root/.config/composer/vendor/bin/joomla'
|
joomlaPath = '/root/.config/composer/vendor/bin/joomla'
|
||||||
else:
|
else:
|
||||||
|
command = 'composer global require joomlatools/console'
|
||||||
|
ProcessUtilities.outputExecutioner(command, externalApp, None, self.permPath)
|
||||||
|
|
||||||
|
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
|
||||||
joomlaPath = '/home/%s/.composer/vendor/bin/joomla' % (self.masterDomain)
|
joomlaPath = '/home/%s/.composer/vendor/bin/joomla' % (self.masterDomain)
|
||||||
|
else:
|
||||||
|
joomlaPath = '/home/%s/.config/composer/vendor/bin/joomla' % (self.masterDomain)
|
||||||
|
|
||||||
## Run the install command
|
## Run the install command
|
||||||
|
|
||||||
|
|||||||
@@ -106,10 +106,13 @@ class ProcessUtilities(multi.Thread):
|
|||||||
try:
|
try:
|
||||||
if os.path.exists(ProcessUtilities.debugPath):
|
if os.path.exists(ProcessUtilities.debugPath):
|
||||||
logging.writeToFile(command)
|
logging.writeToFile(command)
|
||||||
|
|
||||||
|
f = open(os.devnull, 'w')
|
||||||
|
|
||||||
if shell == False:
|
if shell == False:
|
||||||
res = subprocess.call(shlex.split(command))
|
res = subprocess.call(shlex.split(command), stdout=f, stderr=f)
|
||||||
else:
|
else:
|
||||||
res = subprocess.call(command, shell=shell)
|
res = subprocess.call(command, shell=shell, stdout=f, stderr=f)
|
||||||
|
|
||||||
if res == 0:
|
if res == 0:
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
Reference in New Issue
Block a user