From 7d554454f949bcfe8cddca5dbc6763649bbf7405 Mon Sep 17 00:00:00 2001 From: usmannasir Date: Mon, 1 Jan 2024 13:46:50 +0500 Subject: [PATCH] add lsphp82 for upgrading as well --- plogical/backupUtilities.py | 14 ++++++++++++++ plogical/upgrade.py | 7 +++++++ 2 files changed, 21 insertions(+) diff --git a/plogical/backupUtilities.py b/plogical/backupUtilities.py index f1e8873c6..1dfae6401 100755 --- a/plogical/backupUtilities.py +++ b/plogical/backupUtilities.py @@ -557,6 +557,14 @@ def BackupRoot(tempStoragePath, backupName, backupPath, metaPath=None, externalA 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 @@ def BackupRoot(tempStoragePath, backupName, backupPath, metaPath=None, externalA 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: diff --git a/plogical/upgrade.py b/plogical/upgrade.py index 5cb08e55e..d65605f56 100755 --- a/plogical/upgrade.py +++ b/plogical/upgrade.py @@ -2505,6 +2505,10 @@ def installPHP73(): 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 @@ def installPHP73(): 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'