add selinux check before mailscanner install
This commit is contained in:
parent
7550b2417c
commit
e76484832a
|
|
@ -1129,6 +1129,15 @@ def installMailScanner(request):
|
|||
return ACLManager.loadErrorJson()
|
||||
try:
|
||||
|
||||
### Check selinux
|
||||
|
||||
command = 'sestatus'
|
||||
result = ProcessUtilities.outputExecutioner(command)
|
||||
|
||||
if result.find('disabled') == -1:
|
||||
final_json = json.dumps({'status': 0, 'error_message': "Disable selinux before installing MailScanner."})
|
||||
return HttpResponse(final_json)
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
|
||||
execPath = execPath + " installMailScanner"
|
||||
ProcessUtilities.popenExecutioner(execPath)
|
||||
|
|
|
|||
Loading…
Reference in New Issue