bug fix ui upgrade

This commit is contained in:
usmannasir
2024-01-10 09:50:52 +05:00
parent 0ea2ffe190
commit 0b42af3176
2 changed files with 12 additions and 2 deletions

View File

@@ -201,8 +201,12 @@ def upgrade(request):
else:
return ACLManager.loadErrorJson('fetchStatus', 0)
command = f'/usr/local/CyberPanel/bin/python /usr/local/CyberCP/plogical/upgrade.py "SoftUpgrade,{data["branchSelect"]}"'
ProcessUtilities.popenExecutioner(command)
from plogical.applicationInstaller import ApplicationInstaller
extraArgs = {}
extraArgs['branchSelect'] = data["branchSelect"]
background = ApplicationInstaller('UpgradeCP', extraArgs)
background.start()
adminData = {"upgrade": 1}
json_data = json.dumps(adminData)

View File

@@ -84,10 +84,16 @@ class ApplicationInstaller(multi.Thread):
self.WPCreateBackup()
elif self.installApp == 'RestoreWPbackupNow':
self.RestoreWPbackupNow()
elif self.installApp == 'UpgradeCP':
self.UpgradeCP()
except BaseException as msg:
logging.writeToFile(str(msg) + ' [ApplicationInstaller.run]')
def UpgradeCP(self):
command = f'/usr/local/CyberPanel/bin/python /usr/local/CyberCP/plogical/upgrade.py "SoftUpgrade,{self.data["branchSelect"]}"'
ProcessUtilities.executioner(command)
def installMautic(self):
try: