diff options
Diffstat (limited to 'shorewall-model.lua')
-rw-r--r-- | shorewall-model.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/shorewall-model.lua b/shorewall-model.lua index 10a8092..e97fc4e 100644 --- a/shorewall-model.lua +++ b/shorewall-model.lua @@ -92,6 +92,17 @@ function get_filecontent (self, name) return file_content end +function get_logfile () + local me = {} + local cmdtxt = "cat /var/log/messages | grep Shorewall" + local cmd, error = io.popen(cmdtxt ,r) + local cmdoutput = cmd:read("*a") + cmd:close() + me.value = cmdoutput + me.cmd = cmdtxt + return me +end + function update_filecontent (self, name, modifications) path = baseurl .. name local available_files = get_filelist() |