summaryrefslogtreecommitdiffstats
path: root/squid-controller.lua
diff options
context:
space:
mode:
authorAndreas Brodmann <andreas.brodmann@gmail.com>2007-11-26 18:23:03 +0000
committerAndreas Brodmann <andreas.brodmann@gmail.com>2007-11-26 18:23:03 +0000
commitfe04e58f47a99e0adf8df823e5d2e12efb788c96 (patch)
tree254eff002b7accc4655a72237625b58b4aca1616 /squid-controller.lua
parent31f83752e43f441acaffa5c516f59f57005e802e (diff)
downloadacf-squid-fe04e58f47a99e0adf8df823e5d2e12efb788c96.tar.bz2
acf-squid-fe04e58f47a99e0adf8df823e5d2e12efb788c96.tar.xz
updated daily work on /acf/squid
git-svn-id: svn://svn.alpinelinux.org/acf/squid/trunk@367 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'squid-controller.lua')
-rw-r--r--squid-controller.lua17
1 files changed, 15 insertions, 2 deletions
diff --git a/squid-controller.lua b/squid-controller.lua
index f8e5f56..4e9c134 100644
--- a/squid-controller.lua
+++ b/squid-controller.lua
@@ -92,8 +92,21 @@ cfilter = function( self )
local service = { message="", status="", config="" }
- service.status = self.model.get_status()
- service.config = self.model.get_adv_config()
+ if self.clientdata.cmd then
+ if self.clientdata.cmd == "save" then
+ local conf = self.clientdata
+ local config = { filterip = conf.filterip, filterport = conf.filterport,
+ proxyip = conf.proxyip, proxyport = conf.proxyport,
+ accessdeniedaddress = conf.accessdeniedaddress,
+ naughtynesslimit = conf.naughtynesslimit
+ }
+
+ self.model.update_filter_config( config )
+ end
+ end
+
+ service.status = self.model.get_dansguardian_status()
+ service.config, service.cfgerr = self.model.get_filter_config()
return ( cfe ({ option = option, service = service }) )
end