bug fix. cpupgrade

This commit is contained in:
Usman Nasir
2021-03-22 22:01:26 +05:00
parent b1d2ae4c0e
commit 249202b63f
2 changed files with 9 additions and 1 deletions

View File

@@ -42,6 +42,12 @@ class UpgradeCyberPanel:
from plogical.upgrade import Upgrade
## If any update command fails this check make sure upgrade process does not quit
Upgrade.FromCloud = 1
## Backup current CyberCP, incase of failure restore
self.PostStatus('Backing up current installation..,5' % (self.branch))
command = 'cp -R /usr/local/CyberCP /usr/local/CyberCPBak'

View File

@@ -31,6 +31,7 @@ class Upgrade:
installedOutput = ''
CentOSPath = '/etc/redhat-release'
UbuntuPath = '/etc/lsb-release'
FromCloud = 0
AdminACL = '{"adminStatus":1, "versionManagement": 1, "createNewUser": 1, "listUsers": 1, "deleteUser":1 , "resellerCenter": 1, ' \
'"changeUserACL": 1, "createWebsite": 1, "modifyWebsite": 1, "suspendWebsite": 1, "deleteWebsite": 1, ' \
@@ -96,7 +97,8 @@ class Upgrade:
"%m.%d.%Y_%H-%M-%S") + "] #########################################################################\n"))
if do_exit:
os._exit(0)
if Upgrade.FromCloud == 0:
os._exit(0)
@staticmethod
def executioner(command, component, do_exit=0):