mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-14 17:26:17 +01:00
add lsphp82 for upgrading as well
This commit is contained in:
@@ -557,6 +557,14 @@ class backupUtilities:
|
|||||||
command = f'tar -czf {backupPath}/{backupName}.tar.gz -C {tempStoragePath} .'
|
command = f'tar -czf {backupPath}/{backupName}.tar.gz -C {tempStoragePath} .'
|
||||||
ProcessUtilities.executioner(command, externalApp, True)
|
ProcessUtilities.executioner(command, externalApp, True)
|
||||||
|
|
||||||
|
### remove leftover storages
|
||||||
|
|
||||||
|
command = f'rm -rf {tempStoragePath}'
|
||||||
|
ProcessUtilities.executioner(command, externalApp)
|
||||||
|
|
||||||
|
command = f'rm -rf {CPHomeStorage}'
|
||||||
|
ProcessUtilities.executioner(command)
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
backupObs = Backups.objects.filter(fileName=backupName)
|
backupObs = Backups.objects.filter(fileName=backupName)
|
||||||
@@ -594,6 +602,12 @@ class backupUtilities:
|
|||||||
command = f"echo '%s. [511:BackupRoot][[5009]]' > {status}"
|
command = f"echo '%s. [511:BackupRoot][[5009]]' > {status}"
|
||||||
ProcessUtilities.executioner(command, externalApp)
|
ProcessUtilities.executioner(command, externalApp)
|
||||||
|
|
||||||
|
command = f'rm -rf {tempStoragePath}'
|
||||||
|
ProcessUtilities.executioner(command, externalApp)
|
||||||
|
|
||||||
|
command = f'rm -rf {CPHomeStorage}'
|
||||||
|
ProcessUtilities.executioner(command)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def initiateBackup(tempStoragePath, backupName, backupPath):
|
def initiateBackup(tempStoragePath, backupName, backupPath):
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -2505,6 +2505,10 @@ echo $oConfig->Save() ? 'Done' : 'Error';
|
|||||||
command = 'yum install lsphp81* -y'
|
command = 'yum install lsphp81* -y'
|
||||||
subprocess.call(command, shell=True)
|
subprocess.call(command, shell=True)
|
||||||
|
|
||||||
|
if Upgrade.installedOutput.find('lsphp82') == -1:
|
||||||
|
command = 'yum install lsphp82* -y'
|
||||||
|
subprocess.call(command, shell=True)
|
||||||
|
|
||||||
except:
|
except:
|
||||||
command = 'DEBIAN_FRONTEND=noninteractive apt-get -y install ' \
|
command = 'DEBIAN_FRONTEND=noninteractive apt-get -y install ' \
|
||||||
'lsphp7? lsphp7?-common lsphp7?-curl lsphp7?-dev lsphp7?-imap lsphp7?-intl lsphp7?-json ' \
|
'lsphp7? lsphp7?-common lsphp7?-curl lsphp7?-dev lsphp7?-imap lsphp7?-intl lsphp7?-json ' \
|
||||||
@@ -2518,6 +2522,9 @@ echo $oConfig->Save() ? 'Done' : 'Error';
|
|||||||
command = 'DEBIAN_FRONTEND=noninteractive apt-get -y install lsphp81*'
|
command = 'DEBIAN_FRONTEND=noninteractive apt-get -y install lsphp81*'
|
||||||
os.system(command)
|
os.system(command)
|
||||||
|
|
||||||
|
command = 'DEBIAN_FRONTEND=noninteractive apt-get -y install lsphp82*'
|
||||||
|
os.system(command)
|
||||||
|
|
||||||
CentOSPath = '/etc/redhat-release'
|
CentOSPath = '/etc/redhat-release'
|
||||||
openEulerPath = '/etc/openEuler-release'
|
openEulerPath = '/etc/openEuler-release'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user