From 187fb74ab5b33fe2a510a122274fa7c47939d485 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Wed, 25 Feb 2009 20:07:03 +0000 Subject: First cut at Asterisk ACF. Start/stop/restart/reload doesn't work due to issue with script? git-svn-id: svn://svn.alpinelinux.org/acf/asterisk/trunk@1708 ab2d0c66-481e-0410-8bed-d214d4d58bed --- asterisk-controller.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 asterisk-controller.lua (limited to 'asterisk-controller.lua') diff --git a/asterisk-controller.lua b/asterisk-controller.lua new file mode 100644 index 0000000..d771230 --- /dev/null +++ b/asterisk-controller.lua @@ -0,0 +1,23 @@ +-- the squid controller + +module (..., package.seeall) + +require("controllerfunctions") + +default_action = "status" + +status = function( self ) + return self.model.get_status() +end + +startstop = function( self ) + return controllerfunctions.handle_startstop(self, self.model.startstop_service, self.model.get_status, self.clientdata) +end + +listfiles = function( self ) + return self.model.list_files() +end + +edit = function( self ) + return controllerfunctions.handle_form(self, function() return self.model.get_file(self.clientdata.filename) end, self.model.update_file, self.clientdata, "Save", "Edit File", "File Saved") +end -- cgit v1.2.3