mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 05:45:59 +01:00
bug fix php fpm tune ref: https://github.com/usmannasir/cyberpanel/issues/1070
This commit is contained in:
@@ -4637,18 +4637,29 @@ StrictHostKeyChecking no
|
|||||||
|
|
||||||
phpPath = phpPath.split('/')
|
phpPath = phpPath.split('/')
|
||||||
|
|
||||||
|
if os.path.exists(ProcessUtilities.debugPath):
|
||||||
|
logging.CyberCPLogFileWriter.writeToFile(f'PHP path in tune settings {phpPath}')
|
||||||
|
|
||||||
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
|
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
|
||||||
if phpPath[1] == 'etc':
|
if phpPath[1] == 'etc':
|
||||||
phpVersion = phpPath[4][3] + phpPath[4][4]
|
phpVersion = phpPath[4][3] + phpPath[4][4]
|
||||||
|
phpVersion = f'PHP {phpPath[4][3]}.{phpPath[4][4]}'
|
||||||
else:
|
else:
|
||||||
phpVersion = phpPath[3][3] + phpPath[3][4]
|
phpVersion = phpPath[3][3] + phpPath[3][4]
|
||||||
|
phpVersion = f'PHP {phpPath[3][3]}.{phpPath[3][4]}'
|
||||||
else:
|
else:
|
||||||
phpVersion = f'PHP {phpPath[2]}'
|
phpVersion = f'PHP {phpPath[2]}'
|
||||||
|
|
||||||
php = PHPManager.getPHPString(phpVersion)
|
#php = PHPManager.getPHPString(phpVersion)
|
||||||
|
|
||||||
|
if os.path.exists(ProcessUtilities.debugPath):
|
||||||
|
logging.CyberCPLogFileWriter.writeToFile(f'PHP Version in tune settings {phpVersion}')
|
||||||
|
|
||||||
phpService = ApacheVhost.DecideFPMServiceName(phpVersion)
|
phpService = ApacheVhost.DecideFPMServiceName(phpVersion)
|
||||||
|
|
||||||
|
if os.path.exists(ProcessUtilities.debugPath):
|
||||||
|
logging.CyberCPLogFileWriter.writeToFile(f'PHP service in tune settings {phpService}')
|
||||||
|
|
||||||
command = f"systemctl stop {phpService}"
|
command = f"systemctl stop {phpService}"
|
||||||
ProcessUtilities.normalExecutioner(command)
|
ProcessUtilities.normalExecutioner(command)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user