mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-06 21:35:55 +01:00
bug fix: https://forums.cyberpanel.net/discussion/5405/litespeed-enterprise-is-rebooting-every-3-minutes
This commit is contained in:
@@ -348,6 +348,28 @@ class ServerStatusUtil:
|
||||
ProcessUtilities.stopLitespeed()
|
||||
ProcessUtilities.restartLitespeed()
|
||||
|
||||
### Check and remove OLS restart if lsws ent detected
|
||||
|
||||
CentOSPath = '/etc/redhat-release'
|
||||
|
||||
if os.path.exists(CentOSPath):
|
||||
cronPath = '/var/spool/cron/root'
|
||||
else:
|
||||
cronPath = '/var/spool/cron/crontabs/root'
|
||||
|
||||
data = open(cronPath, 'r').readlines()
|
||||
|
||||
writeToFile = open(cronPath, 'w')
|
||||
|
||||
for items in data:
|
||||
if items.find('-maxdepth 2 -type f -newer') > -1:
|
||||
pass
|
||||
else:
|
||||
writeToFile.writelines(items)
|
||||
|
||||
writeToFile.close()
|
||||
|
||||
###
|
||||
|
||||
logging.CyberCPLogFileWriter.statusWriter(ServerStatusUtil.lswsInstallStatusPath,"Successfully switched to LITESPEED ENTERPRISE WEB SERVER. [200]\n", 1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user