mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 05:45:59 +01:00
install lsphp80 if not present for mautic
This commit is contained in:
@@ -99,6 +99,12 @@ class ApplicationInstaller(multi.Thread):
|
|||||||
password = self.extraArgs['password']
|
password = self.extraArgs['password']
|
||||||
email = self.extraArgs['email']
|
email = self.extraArgs['email']
|
||||||
|
|
||||||
|
## Open Status File
|
||||||
|
|
||||||
|
statusFile = open(tempStatusPath, 'w')
|
||||||
|
statusFile.writelines('Setting up paths,0')
|
||||||
|
statusFile.close()
|
||||||
|
|
||||||
|
|
||||||
### lets first find php path
|
### lets first find php path
|
||||||
|
|
||||||
@@ -108,13 +114,18 @@ class ApplicationInstaller(multi.Thread):
|
|||||||
|
|
||||||
phpPath = phpUtilities.GetPHPVersionFromFile(vhFile)
|
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')
|
FNULL = open(os.devnull, 'w')
|
||||||
|
|
||||||
## Open Status File
|
|
||||||
|
|
||||||
statusFile = open(tempStatusPath, 'w')
|
|
||||||
statusFile.writelines('Setting up paths,0')
|
|
||||||
statusFile.close()
|
|
||||||
|
|
||||||
finalPath = ''
|
finalPath = ''
|
||||||
self.permPath = ''
|
self.permPath = ''
|
||||||
|
|||||||
@@ -232,6 +232,17 @@ class phpUtilities:
|
|||||||
result = result.rsplit("lsphp", 1)[0] + "php"
|
result = result.rsplit("lsphp", 1)[0] + "php"
|
||||||
return result
|
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)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user