Skip to content

Commit

Permalink
install lsphp80 if not present for mautic
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Aug 10, 2023
1 parent db8903b commit c5e7008
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
19 changes: 15 additions & 4 deletions plogical/applicationInstaller.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ def installMautic(self):
password = self.extraArgs['password']
email = self.extraArgs['email']

## Open Status File

statusFile = open(tempStatusPath, 'w')
statusFile.writelines('Setting up paths,0')
statusFile.close()


### lets first find php path

Expand All @@ -108,13 +114,18 @@ def installMautic(self):

phpPath = phpUtilities.GetPHPVersionFromFile(vhFile)

### basically for now php 8.0 is being checked

if not os.path.exists(phpPath):
statusFile = open(tempStatusPath, 'w')
statusFile.writelines('PHP 8.0 missing installing now..,20')
statusFile.close()
phpUtilities.InstallSaidPHP('80')


FNULL = open(os.devnull, 'w')

## Open Status File

statusFile = open(tempStatusPath, 'w')
statusFile.writelines('Setting up paths,0')
statusFile.close()

finalPath = ''
self.permPath = ''
Expand Down
11 changes: 11 additions & 0 deletions plogical/phpUtilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,17 @@ def GetPHPVersionFromFile(vhFile):
result = result.rsplit("lsphp", 1)[0] + "php"
return result

@staticmethod
def InstallSaidPHP(php):
if ProcessUtilities.decideDistro() == ProcessUtilities.ubuntu or ProcessUtilities.decideDistro() == ProcessUtilities.ubuntu20:
command = f'DEBIAN_FRONTEND=noninteractive apt-get -y install lsphp{php}*'
else:
command = f'dnf install lsphp{php}* --exclude lsphp73-pecl-zip --exclude *imagick* -y --skip-broken'


ProcessUtilities.executioner(command, None, True)





Expand Down

0 comments on commit c5e7008

Please sign in to comment.