add lsphp82 for upgrading as well

This commit is contained in:
usmannasir
2024-01-01 13:46:50 +05:00
parent ca8f7c175e
commit 7d554454f9
2 changed files with 21 additions and 0 deletions

View File

@@ -557,6 +557,14 @@ class backupUtilities:
command = f'tar -czf {backupPath}/{backupName}.tar.gz -C {tempStoragePath} .'
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)
@@ -594,6 +602,12 @@ class backupUtilities:
command = f"echo '%s. [511:BackupRoot][[5009]]' > {status}"
ProcessUtilities.executioner(command, externalApp)
command = f'rm -rf {tempStoragePath}'
ProcessUtilities.executioner(command, externalApp)
command = f'rm -rf {CPHomeStorage}'
ProcessUtilities.executioner(command)
@staticmethod
def initiateBackup(tempStoragePath, backupName, backupPath):
try:

View File

@@ -2505,6 +2505,10 @@ echo $oConfig->Save() ? 'Done' : 'Error';
command = 'yum install lsphp81* -y'
subprocess.call(command, shell=True)
if Upgrade.installedOutput.find('lsphp82') == -1:
command = 'yum install lsphp82* -y'
subprocess.call(command, shell=True)
except:
command = 'DEBIAN_FRONTEND=noninteractive apt-get -y install ' \
'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*'
os.system(command)
command = 'DEBIAN_FRONTEND=noninteractive apt-get -y install lsphp82*'
os.system(command)
CentOSPath = '/etc/redhat-release'
openEulerPath = '/etc/openEuler-release'