summaryrefslogtreecommitdiffstats
path: root/squid-controller.lua
diff options
context:
space:
mode:
Diffstat (limited to 'squid-controller.lua')
-rw-r--r--squid-controller.lua15
1 files changed, 6 insertions, 9 deletions
diff --git a/squid-controller.lua b/squid-controller.lua
index 8ffe0cb..7014935 100644
--- a/squid-controller.lua
+++ b/squid-controller.lua
@@ -40,11 +40,11 @@ basic = function( self )
redirect(self, "dep")
end
- local service = { message="", status="", error="" }
+ local service = {}
if self.clientdata.srvcmd then
local srvcmd = self.clientdata.srvcmd
if srvcmd == "start" or srvcmd == "stop" or srvcmd == "restart" then
- service.message = self.model.service_control( srvcmd )
+ service.srvcmdresult, service.message = self.model.service_control( srvcmd )
end
end
@@ -68,7 +68,6 @@ basic = function( self )
end
service.status = self.model.get_status()
--- info.status.value = service.status;
service.config, service.error = self.model.get_basic_config()
return ( cfe ({ option = option, service = service, info = info }) )
@@ -90,11 +89,11 @@ authentication = function( self )
extra = ""
}
- local service = { message="", status="", error="" }
+ local service = {}
if self.clientdata.srvcmd then
local srvcmd = self.clientdata.srvcmd
if srvcmd == "start" or srvcmd == "stop" or srvcmd == "restart" then
- service.message = self.model.service_control( srvcmd )
+ service.srvcmdresult, service.message = self.model.service_control( srvcmd )
end
end
@@ -120,7 +119,6 @@ authentication = function( self )
end
service.status = self.model.get_status()
--- info.status.value = service.status
service.config, service.error = self.model.get_basic_config()
return ( cfe ({ option = option, service = service, info = info }) )
@@ -142,11 +140,11 @@ advanced = function( self )
extra = ""
}
- local service = { message="", status="", config="" }
+ local service = {}
if self.clientdata.srvcmd then
local srvcmd = self.clientdata.srvcmd
if srvcmd == "start" or srvcmd == "stop" or srvcmd == "restart" then
- service.message = self.model.service_control( srvcmd )
+ service.srvcmdresult, service.message = self.model.service_control( srvcmd )
end
end
@@ -157,7 +155,6 @@ advanced = function( self )
end
service.status = self.model.get_status()
--- info.status.value = service.status
service.config = self.model.get_adv_config()
return ( cfe ({ option = option, service = service, info = info }) )