Skip to content

Commit

Permalink
add lsphp82 for upgrading as well
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Jan 1, 2024
1 parent ca8f7c1 commit 7d55445
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
14 changes: 14 additions & 0 deletions plogical/backupUtilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand Down
7 changes: 7 additions & 0 deletions plogical/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ' \
Expand All @@ -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'

Expand Down

0 comments on commit 7d55445

Please sign in to comment.