Skip to content
Permalink
Browse files

resubmit commit to fix Server Logs for Ubuntu OS

  • Loading branch information
whattheserver committed Oct 15, 2019
1 parent eaee1bc commit b011641d4bfe14d20172cc174036e0ea4b7108fe
Showing with 10 additions and 3 deletions.
  1. +10 −3 serverLogs/views.py
13 serverLogs/views.py 100755 → 100644
@@ -12,6 +12,7 @@
from plogical.virtualHostUtilities import virtualHostUtilities
from plogical.acl import ACLManager
from plogical.processUtilities import ProcessUtilities
import os
# Create your views here.


@@ -130,9 +131,15 @@ def getLogsFromFile(request):
elif type == "error":
fileName = installUtilities.Server_root_path + "/logs/error.log"
elif type == "email":
fileName = "/var/log/maillog"
if ProcessUtilities.decideDistro() == ProcessUtilities.centos:
fileName = "/var/log/maillog"
else:
fileName = "/var/log/mail.log"
elif type == "ftp":
fileName = "/var/log/messages"
if ProcessUtilities.decideDistro() == ProcessUtilities.centos:
fileName = "/var/log/messages"
else:
fileName = "/var/log/syslog"
elif type == "modSec":
fileName = "/usr/local/lsws/logs/auditmodsec.log"
elif type == "cyberpanel":
@@ -195,4 +202,4 @@ def clearLogFile(request):
logging.CyberCPLogFileWriter.writeToFile(str(msg))
data_ret = {'cleanStatus': 0, 'error_message': str(msg)}
json_data = json.dumps(data_ret)
return HttpResponse(json_data)
return HttpResponse(json_data)

0 comments on commit b011641

Please sign in to comment.
You can’t perform that action at this time.