mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-05-10 02:45:58 +02:00
bug fix. cpupgrade
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user