mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-15 17:56:12 +01:00
mautic version 5 and php 8.1 support
This commit is contained in:
@@ -234,7 +234,7 @@ class ApplicationInstaller(multi.Thread):
|
|||||||
finalURL = domainName
|
finalURL = domainName
|
||||||
|
|
||||||
|
|
||||||
command = f"{phpPath} bin/console mautic:install --db_host='localhost' --db_name='{dbName}' --db_user='{dbUser}' --db_password='{dbPassword}' --admin_username='{username}' --admin_email='{email}' --admin_password='{password}' --db_port='3306' http://{finalURL} -f"
|
command = f"{phpPath} -d memory_limit=256M bin/console mautic:install --db_host='localhost' --db_name='{dbName}' --db_user='{dbUser}' --db_password='{dbPassword}' --admin_username='{username}' --admin_email='{email}' --admin_password='{password}' --db_port='3306' http://{finalURL} -f"
|
||||||
|
|
||||||
result = ProcessUtilities.outputExecutioner(command, externalApp, None, finalPath)
|
result = ProcessUtilities.outputExecutioner(command, externalApp, None, finalPath)
|
||||||
|
|
||||||
|
|||||||
@@ -219,6 +219,20 @@ class phpUtilities:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def GetPHPVersionFromFile(vhFile, domainName=None):
|
def GetPHPVersionFromFile(vhFile, domainName=None):
|
||||||
|
|
||||||
|
if domainName == None:
|
||||||
|
# Your file path
|
||||||
|
file_path = "/usr/local/lsws/conf/vhosts/mautic.wpmautic.net/vhost.conf"
|
||||||
|
|
||||||
|
# Split the path by '/'
|
||||||
|
path_parts = file_path.split('/')
|
||||||
|
|
||||||
|
# Find the index of 'vhosts' in the path
|
||||||
|
vhosts_index = path_parts.index('vhosts')
|
||||||
|
|
||||||
|
# Extract the domain
|
||||||
|
domainName = path_parts[vhosts_index + 1]
|
||||||
|
|
||||||
finalConfPath = ApacheVhost.configBasePath + domainName + '.conf'
|
finalConfPath = ApacheVhost.configBasePath + domainName + '.conf'
|
||||||
if os.path.exists(finalConfPath):
|
if os.path.exists(finalConfPath):
|
||||||
command = f'grep -Eo -m 1 "php[0-9]+" {finalConfPath} | sed -n "1p"'
|
command = f'grep -Eo -m 1 "php[0-9]+" {finalConfPath} | sed -n "1p"'
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user