diff options
author | Ted Trask <ttrask01@yahoo.com> | 2016-08-10 17:46:29 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2016-08-10 17:46:29 +0000 |
commit | 4ecd5d55f764944c9b92d942a5eae5719d633a50 (patch) | |
tree | f831eeb886c2940935ebc1e38752a20ddd82a01d /tcpproxy-model.lua | |
parent | 3a6b48e8d9f6fc33ed5772ec28f33daac5b25fa6 (diff) | |
download | acf-tcpproxy-4ecd5d55f764944c9b92d942a5eae5719d633a50.tar.bz2 acf-tcpproxy-4ecd5d55f764944c9b92d942a5eae5719d633a50.tar.xz |
Diffstat (limited to 'tcpproxy-model.lua')
-rw-r--r-- | tcpproxy-model.lua | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tcpproxy-model.lua b/tcpproxy-model.lua index 6dc7537..8944754 100644 --- a/tcpproxy-model.lua +++ b/tcpproxy-model.lua @@ -200,11 +200,11 @@ end -- ################################################################################ -- PUBLIC FUNCTIONS -function mymodule.get_startstop(self, clientdata) +function mymodule.get_startstop(self, clientdata) return modelfunctions.get_startstop(processname) end -function mymodule.startstop_service(self, startstop, action) +function mymodule.startstop_service(self, startstop, action) return modelfunctions.startstop_service(startstop, action) end @@ -242,10 +242,10 @@ function mymodule.listsmtpentries(self) table.insert(entries.value, entry) end end - + local reverseaddress = {} for i,int in ipairs(entries.value) do reverseaddress[int.ipaddr or int.interface] = i end - + config = config or parseconfigfile(fs.read_file(configfile) or "") local smtpconfig = getsmtpconfig(config) for i,int in ipairs(smtpconfig) do @@ -260,7 +260,7 @@ function mymodule.listsmtpentries(self) table.insert(entries.value, int) end end - + return entries end @@ -297,7 +297,7 @@ end function mymodule.updatesmtpentry(self, entry) local success, entry = validatesmtpentry(entry) - + if success then local options = parsesmtpcmd(getsmtpcmd(entry.value.ipaddr.value)) @@ -335,7 +335,7 @@ function mymodule.updatesmtpentry(self, entry) if options[""] ~= "" then exec[#exec + 1] = options[""] end - + setsmtpcmd(entry.value.ipaddr.value, table.concat(exec, " ")) else entry.errtxt = "Failed to set SMTP Proxy Entry" @@ -416,7 +416,7 @@ function mymodule.delsmtpfile(self, delfile) delfile.errtxt = "Failed to delete SMTP Proxy File" delfile.value.filename.errtxt = "Invalid filename" end - + return delfile end |