diff options
-rw-r--r-- | shorewall-model.lua | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/shorewall-model.lua b/shorewall-model.lua index d438b66..ca70e89 100644 --- a/shorewall-model.lua +++ b/shorewall-model.lua @@ -175,10 +175,8 @@ function getstatus() end function getstatusdetails() - local f = io.popen("/sbin/shorewall status 2>%1") - local programstate = f:read("*a") or "" - f:close() - return cfe({ value=programstate, label="Shorewall status report" }) + local programstate, errtxt = modelfunctions.run_executable({"shorewall", "status"}, true) + return cfe({ value=programstate, label="Shorewall status report", errtxt=errtxt }) end function get_startstop(self, clientdata) |