diff options
author | Ted Trask <ttrask01@yahoo.com> | 2009-02-25 20:07:03 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2009-02-25 20:07:03 +0000 |
commit | 187fb74ab5b33fe2a510a122274fa7c47939d485 (patch) | |
tree | 1facc41c00318b19e9ee42722cb82e4d0869e469 /asterisk-controller.lua | |
download | acf-asterisk-187fb74ab5b33fe2a510a122274fa7c47939d485.tar.bz2 acf-asterisk-187fb74ab5b33fe2a510a122274fa7c47939d485.tar.xz |
First cut at Asterisk ACF. Start/stop/restart/reload doesn't work due to issue with script?v0.1.0
git-svn-id: svn://svn.alpinelinux.org/acf/asterisk/trunk@1708 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'asterisk-controller.lua')
-rw-r--r-- | asterisk-controller.lua | 23 |
1 files changed, 23 insertions, 0 deletions
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 |