summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openssh-controller.lua4
l---------openssh-logfile-html.lsp1
-rw-r--r--openssh-model.lua14
-rw-r--r--openssh.menu2
4 files changed, 20 insertions, 1 deletions
diff --git a/openssh-controller.lua b/openssh-controller.lua
index 134a628..c37ddfa 100644
--- a/openssh-controller.lua
+++ b/openssh-controller.lua
@@ -38,4 +38,8 @@ function mymodule.addauth(self)
return self.handle_form(self, function() return self.model.get_auth(self.clientdata.user) end, self.model.create_auth, self.clientdata, "Add", "Add New Authorized Key", "Key Added")
end
+function mymodule.logfile(self)
+ return self.model.get_logfile(self, self.clientdata)
+end
+
return mymodule
diff --git a/openssh-logfile-html.lsp b/openssh-logfile-html.lsp
new file mode 120000
index 0000000..ac8854f
--- /dev/null
+++ b/openssh-logfile-html.lsp
@@ -0,0 +1 @@
+../logfile-html.lsp \ No newline at end of file
diff --git a/openssh-model.lua b/openssh-model.lua
index acd89fd..f460c0e 100644
--- a/openssh-model.lua
+++ b/openssh-model.lua
@@ -334,4 +334,18 @@ function mymodule.create_auth(self, authstr)
return authstr
end
+function mymodule.get_logfile(self, clientdata)
+ local retval = cfe({ type="group", value={}, label="Log File Configuration" })
+ retval.value.facility = cfe({value="auth", label="Syslog Facility"})
+ retval.value.grep = cfe({ value="sshd", label="Grep" })
+
+ local config = format.parse_configfile(fs.read_file(configfile) or "")
+ if config then
+ if config.SyslogFacility then
+ retval.value.facility.value = config.SyslogFacility:lower()
+ end
+ end
+ return retval
+end
+
return mymodule
diff --git a/openssh.menu b/openssh.menu
index c5656cc..d72c8a3 100644
--- a/openssh.menu
+++ b/openssh.menu
@@ -3,4 +3,4 @@ Applications 10SSH Status welcome
Applications 10SSH Config config
Applications 10SSH Authorized_Users listusers
Applications 10SSH Expert expert
-#Applications 10SSH Logfile logfile
+Applications 10SSH Logfile logfile