Commit b305554c authored by Jeff Bilyk's avatar Jeff Bilyk

Fix typos and correct paths to config and log files

parent 4aa007e7
...@@ -3,7 +3,7 @@ PACKAGE=acf-$(APP_NAME) ...@@ -3,7 +3,7 @@ PACKAGE=acf-$(APP_NAME)
VERSION=0.3.0 VERSION=0.3.0
APP_DIST=\ APP_DIST=\
lightpd* \ lighttpd* \
EXTRA_DIST=README Makefile config.mk EXTRA_DIST=README Makefile config.mk
......
...@@ -22,10 +22,7 @@ function listfiles(self) ...@@ -22,10 +22,7 @@ function listfiles(self)
end end
function expert(self) function expert(self)
return controllerfunctions.handle_form(self, function() return return controllerfunctions.handle_form(self, function() return self.model.getfiledetails(self.clientdata.filename) end, self.model.updatefiledetails, self.clientdata, "Save", "Edit ClamAV File", "File Saved")
self.model.getfiledetails(self.clientdata.filename) end,
self.model.updatefiledetails, self.clientdata, "Save", "Edit Lighttpd
File", "File Saved")
end end
function logfile(self) function logfile(self)
......
...@@ -8,8 +8,7 @@ require("format") ...@@ -8,8 +8,7 @@ require("format")
-- Set variables -- Set variables
local processname = "lighttpd" local processname = "lighttpd"
local packagename = "lighttpd" local packagename = "lighttpd"
local filelist = {"/etc/lighttpd/lightpd.conf", local filelist = {"/etc/lighttpd/lighttpd.conf", "/etc/lighttpd/mod_cgi.conf", "/etc/lighttpd/mod_fastcgi.conf", "/etc/lighttpd/mod_fastcgi_fpm.conf"}
"/etc/lighttpd/mod_cgi.conf"}
local path = "PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin " local path = "PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin "
...@@ -24,13 +23,11 @@ function startstop_service(action) ...@@ -24,13 +23,11 @@ function startstop_service(action)
end end
function getstatus() function getstatus()
return modelfunctions.getstatus(processname, packagename, return modelfunctions.getstatus(processname, packagename, "Lighttpd Status")
"Lighttpd Status")
end end
function getstatusdetails() function getstatusdetails()
return cfe({ type="longtext", value="", label="Lighttpd Status return cfe({ type="longtext", value="", label="Lighttpd Status Details" })
Details" })
end end
function getfilelist() function getfilelist()
...@@ -43,8 +40,7 @@ function getfilelist() ...@@ -43,8 +40,7 @@ function getfilelist()
table.sort(listed_files, function (a,b) return (a.filename < b.filename) end ) table.sort(listed_files, function (a,b) return (a.filename < b.filename) end )
return cfe({ type="list", value=listed_files, label="Lighttpd return cfe({ type="list", value=listed_files, label="Lighttpd File List" })
File List" })
end end
function getfiledetails(filename) function getfiledetails(filename)
...@@ -59,14 +55,13 @@ function getlogfile () ...@@ -59,14 +55,13 @@ function getlogfile ()
local files = {} local files = {}
local logfilepath = format.parse_configfile(fs.read_file(filelist[1]) or "").LogFile local logfilepath = format.parse_configfile(fs.read_file(filelist[1]) or "").LogFile
if not logfilepath then if not logfilepath then
files[#files+1] = {path = files[#files+1] = {path = "/var/log/lighttpd/access.log"}
"/var/log/lighttpd/access.log"}
else else
files[#files+1] = {path=logfilepath} files[#files+1] = {path=logfilepath}
end end
logfilepath = format.parse_configfile(fs.read_file(filelist[2]) or "").UpdateLogFile logfilepath = format.parse_configfile(fs.read_file(filelist[2]) or "").UpdateLogFile
if not logfilepath then if not logfilepath then
files[#files+1] = {path = "/var/log/eror.log"} files[#files+1] = {path = "/var/log/lighttpd/error.log"}
else else
files[#files+1] = {path=logfilepath} files[#files+1] = {path=logfilepath}
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment