bug fix: fix session mountpoint for php when using cloudlinux

This commit is contained in:
usmannasir
2024-01-04 15:41:39 +05:00
parent 534ed4436e
commit bee6bb1c14

View File

@@ -108,6 +108,26 @@ class CageFS:
writeToFile.write('CLInstalled') writeToFile.write('CLInstalled')
writeToFile.close() writeToFile.close()
#### mount session save paths
if os.path.exists('/etc/cagefs/cagefs.mp'):
from managePHP.phpManager import PHPManager
php_versions = PHPManager.findPHPVersions()
for php in php_versions:
PHPVers = PHPManager.getPHPString(php)
line = f'@/var/lib/lsphp/session/lsphp{PHPVers},700\n'
WriteToFile = open('/etc/cagefs/cagefs.mp', 'a')
WriteToFile.write(line)
WriteToFile.close()
command = 'cagefsctl --remount-all'
ServerStatusUtil.executioner(command, statusFile)
logging.CyberCPLogFileWriter.statusWriter(ServerStatusUtil.lswsInstallStatusPath, logging.CyberCPLogFileWriter.statusWriter(ServerStatusUtil.lswsInstallStatusPath,
"Packages successfully installed.[200]\n", 1) "Packages successfully installed.[200]\n", 1)