Skip to content

Commit

Permalink
bug fix ui upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Jan 10, 2024
1 parent 0ea2ffe commit 0b42af3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 6 additions & 2 deletions baseTemplate/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 6 additions & 0 deletions plogical/applicationInstaller.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,16 @@ def run(self):
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:

Expand Down

0 comments on commit 0b42af3

Please sign in to comment.