diff options
-rw-r--r-- | snort-expert-html.lsp | 17 | ||||
-rw-r--r-- | snort-model.lua | 5 |
2 files changed, 16 insertions, 6 deletions
diff --git a/snort-expert-html.lsp b/snort-expert-html.lsp index 9de9b0f..ab2ee56 100644 --- a/snort-expert-html.lsp +++ b/snort-expert-html.lsp @@ -1,5 +1,11 @@ <? local view = ... ?> - +<? +--[[ DEBUG INFORMATION +io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>") +io.write(html.cfe_unpack(view)) +io.write("</span>") +--]] +?> <h1>SYSTEM INFO</h1> <dl> @@ -57,17 +63,18 @@ </form></dd> </dl> -<? if (view.startstop) and (view.startstop.cmdresult) then ?> +<? if (view.startstop) then ?> <dl> <dt>Previous action result</dt> -<dd><pre><?= view.startstop.cmdresult?></pre></dd> +<dd><pre><?= view.startstop?></pre></dd> </dl> <? end ?> <? --[[ DEBUG INFORMATION -require("debugs") -io.write(debugs.variables(view)) +io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>") +io.write(html.cfe_unpack(form)) +io.write("</span>") --]] ?> diff --git a/snort-model.lua b/snort-model.lua index e602a16..02c5a1e 100644 --- a/snort-model.lua +++ b/snort-model.lua @@ -9,6 +9,8 @@ require("procps") require("daemoncontrol") require("format") +local processname = "snort" + local configfile = "/etc/snort/snort.conf" -- ################################################################################ @@ -41,7 +43,8 @@ function get_filedetails() end function startstop_service ( self, state ) - return daemoncontrol.daemoncontrol("snort", state) + local cmdresult,cmdmessage,cmderror,cmdaction = daemoncontrol.daemoncontrol(processname, state) + return cmdmessage end function read_alert() |