mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-06 13:25:51 +01:00
SpamAssassin bug fix for ubuntu
This commit is contained in:
@@ -57,24 +57,24 @@ class InstallCyberPanel:
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
command = 'wget https://www.litespeedtech.com/packages/5.0/lsws-5.3.4-ent-x86_64-linux.tar.gz'
|
command = 'wget https://www.litespeedtech.com/packages/5.0/lsws-5.3.5-ent-x86_64-linux.tar.gz'
|
||||||
install.preFlightsChecks.call(command, self.distro, '[installLiteSpeed]',
|
install.preFlightsChecks.call(command, self.distro, '[installLiteSpeed]',
|
||||||
'Install LiteSpeed Webserver Enterprise.',
|
'Install LiteSpeed Webserver Enterprise.',
|
||||||
1, 1, os.EX_OSERR)
|
1, 1, os.EX_OSERR)
|
||||||
|
|
||||||
command = 'tar zxf lsws-5.3.4-ent-x86_64-linux.tar.gz'
|
command = 'tar zxf lsws-5.3.5-ent-x86_64-linux.tar.gz'
|
||||||
install.preFlightsChecks.call(command, self.distro, '[installLiteSpeed]',
|
install.preFlightsChecks.call(command, self.distro, '[installLiteSpeed]',
|
||||||
'Install LiteSpeed Webserver Enterprise.',
|
'Install LiteSpeed Webserver Enterprise.',
|
||||||
1, 1, os.EX_OSERR)
|
1, 1, os.EX_OSERR)
|
||||||
|
|
||||||
writeSerial = open('lsws-5.3.4/serial.no', 'w')
|
writeSerial = open('lsws-5.3.5/serial.no', 'w')
|
||||||
writeSerial.writelines(self.serial)
|
writeSerial.writelines(self.serial)
|
||||||
writeSerial.close()
|
writeSerial.close()
|
||||||
|
|
||||||
shutil.copy('litespeed/install.sh', 'lsws-5.3.4/')
|
shutil.copy('litespeed/install.sh', 'lsws-5.3.5/')
|
||||||
shutil.copy('litespeed/functions.sh', 'lsws-5.3.4/')
|
shutil.copy('litespeed/functions.sh', 'lsws-5.3.5/')
|
||||||
|
|
||||||
os.chdir('lsws-5.3.4')
|
os.chdir('lsws-5.3.5')
|
||||||
|
|
||||||
command = 'chmod +x install.sh'
|
command = 'chmod +x install.sh'
|
||||||
install.preFlightsChecks.call(command, self.distro, '[installLiteSpeed]',
|
install.preFlightsChecks.call(command, self.distro, '[installLiteSpeed]',
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import requests
|
|||||||
from processUtilities import ProcessUtilities
|
from processUtilities import ProcessUtilities
|
||||||
from serverStatus.serverStatusUtil import ServerStatusUtil
|
from serverStatus.serverStatusUtil import ServerStatusUtil
|
||||||
import threading as multi
|
import threading as multi
|
||||||
|
from mailUtilities import mailUtilities
|
||||||
|
|
||||||
|
|
||||||
# Use default socket to connect
|
# Use default socket to connect
|
||||||
@@ -64,6 +65,9 @@ class ContainerManager(multi.Thread):
|
|||||||
if ACLManager.currentContextPermission(currentACL, 'createContainer') == 0:
|
if ACLManager.currentContextPermission(currentACL, 'createContainer') == 0:
|
||||||
return ACLManager.loadError()
|
return ACLManager.loadError()
|
||||||
|
|
||||||
|
|
||||||
|
mailUtilities.checkHome()
|
||||||
|
|
||||||
statusFile = open(ServerStatusUtil.lswsInstallStatusPath, 'w')
|
statusFile = open(ServerStatusUtil.lswsInstallStatusPath, 'w')
|
||||||
|
|
||||||
logging.CyberCPLogFileWriter.statusWriter(ServerStatusUtil.lswsInstallStatusPath,
|
logging.CyberCPLogFileWriter.statusWriter(ServerStatusUtil.lswsInstallStatusPath,
|
||||||
@@ -92,12 +96,14 @@ class ContainerManager(multi.Thread):
|
|||||||
command = 'sudo systemctl start docker'
|
command = 'sudo systemctl start docker'
|
||||||
ServerStatusUtil.executioner(command, statusFile)
|
ServerStatusUtil.executioner(command, statusFile)
|
||||||
|
|
||||||
cm = ContainerManager(self.name, 'restartGunicorn')
|
|
||||||
cm.start()
|
|
||||||
|
|
||||||
logging.CyberCPLogFileWriter.statusWriter(ServerStatusUtil.lswsInstallStatusPath,
|
logging.CyberCPLogFileWriter.statusWriter(ServerStatusUtil.lswsInstallStatusPath,
|
||||||
"Docker successfully installed.[200]\n", 1)
|
"Docker successfully installed.[200]\n", 1)
|
||||||
|
|
||||||
|
time.sleep(2)
|
||||||
|
|
||||||
|
cm = ContainerManager(self.name, 'restartGunicorn')
|
||||||
|
cm.start()
|
||||||
|
|
||||||
except BaseException, msg:
|
except BaseException, msg:
|
||||||
logging.CyberCPLogFileWriter.statusWriter(ServerStatusUtil.lswsInstallStatusPath, str(msg) + ' [404].', 1)
|
logging.CyberCPLogFileWriter.statusWriter(ServerStatusUtil.lswsInstallStatusPath, str(msg) + ' [404].', 1)
|
||||||
|
|
||||||
|
|||||||
@@ -426,6 +426,21 @@ milter_default_action = accept
|
|||||||
def configureSpamAssassin():
|
def configureSpamAssassin():
|
||||||
try:
|
try:
|
||||||
|
|
||||||
|
if ProcessUtilities.decideDistro() == ProcessUtilities.ubuntu:
|
||||||
|
confFile = "/etc/mail/spamassassin/local.cf"
|
||||||
|
confData = open(confFile).readlines()
|
||||||
|
|
||||||
|
conf = open(confFile, 'w')
|
||||||
|
|
||||||
|
for items in confData:
|
||||||
|
if items.find('report_safe') > -1 or items.find('rewrite_header') > -1 or items.find('required_score') > -1 or items.find('required_hits') > -1:
|
||||||
|
conf.write(items.strip('#').strip(' '))
|
||||||
|
else:
|
||||||
|
conf.write(items)
|
||||||
|
|
||||||
|
conf.close()
|
||||||
|
|
||||||
|
|
||||||
command = "groupadd spamd"
|
command = "groupadd spamd"
|
||||||
subprocess.call(shlex.split(command))
|
subprocess.call(shlex.split(command))
|
||||||
|
|
||||||
|
|||||||
@@ -547,7 +547,7 @@ class virtualHostUtilities:
|
|||||||
|
|
||||||
writeFile.close()
|
writeFile.close()
|
||||||
|
|
||||||
p = Process(target=mailUtilities.restartServices, args=('restart',))
|
p = Process(target=mailUtilities.restartServices, args=())
|
||||||
p.start()
|
p.start()
|
||||||
|
|
||||||
print "1,None"
|
print "1,None"
|
||||||
|
|||||||
@@ -57,22 +57,22 @@ class ServerStatusUtil:
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
command = 'wget https://www.litespeedtech.com/packages/5.0/lsws-5.3-ent-x86_64-linux.tar.gz'
|
command = 'wget https://www.litespeedtech.com/packages/5.0/lsws-5.3.5-ent-x86_64-linux.tar.gz'
|
||||||
if ServerStatusUtil.executioner(command, statusFile) == 0:
|
if ServerStatusUtil.executioner(command, statusFile) == 0:
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
command = 'tar zxf lsws-5.3-ent-x86_64-linux.tar.gz'
|
command = 'tar zxf lsws-5.3.5-ent-x86_64-linux.tar.gz'
|
||||||
if ServerStatusUtil.executioner(command, statusFile) == 0:
|
if ServerStatusUtil.executioner(command, statusFile) == 0:
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
writeSerial = open('lsws-5.3/serial.no', 'w')
|
writeSerial = open('lsws-5.3.5/serial.no', 'w')
|
||||||
writeSerial.writelines(licenseKey)
|
writeSerial.writelines(licenseKey)
|
||||||
writeSerial.close()
|
writeSerial.close()
|
||||||
|
|
||||||
shutil.copy('/usr/local/CyberCP/serverStatus/litespeed/install.sh', 'lsws-5.3/')
|
shutil.copy('/usr/local/CyberCP/serverStatus/litespeed/install.sh', 'lsws-5.3.5/')
|
||||||
shutil.copy('/usr/local/CyberCP/serverStatus/litespeed/functions.sh', 'lsws-5.3/')
|
shutil.copy('/usr/local/CyberCP/serverStatus/litespeed/functions.sh', 'lsws-5.3.5/')
|
||||||
|
|
||||||
os.chdir('lsws-5.3')
|
os.chdir('lsws-5.3.5')
|
||||||
|
|
||||||
command = 'chmod +x install.sh'
|
command = 'chmod +x install.sh'
|
||||||
if ServerStatusUtil.executioner(command, statusFile) == 0:
|
if ServerStatusUtil.executioner(command, statusFile) == 0:
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user