summaryrefslogtreecommitdiffstats
path: root/kamailio-model.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2011-01-08 20:30:37 +0000
committerTed Trask <ttrask01@yahoo.com>2011-01-08 20:30:37 +0000
commit802b8d7fe548afad99235db73b9c7ffea64c011b (patch)
treea1d64e28d450aa61e6fdefa9565e79b28e36d1bf /kamailio-model.lua
parent7737dbd5def8fe3f38553e6e5c91bfc389fcae64 (diff)
downloadacf-kamailio-802b8d7fe548afad99235db73b9c7ffea64c011b.tar.bz2
acf-kamailio-802b8d7fe548afad99235db73b9c7ffea64c011b.tar.xz
Added createdatabase action.
Diffstat (limited to 'kamailio-model.lua')
-rw-r--r--kamailio-model.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/kamailio-model.lua b/kamailio-model.lua
index 63be94a..3ace9b2 100644
--- a/kamailio-model.lua
+++ b/kamailio-model.lua
@@ -462,3 +462,10 @@ function delete_table_entry(table, id)
return cfe({ value=result, errtxt=errtxt, label="Delete Entry Result" })
end
+
+function create_database()
+ local cmd = path.."echo -e 'y\ny\n' | "..path.."kamdbctl create 2>&1"
+ local f = io.popen(cmd)
+ local result = f:read("*a")
+ return cfe({ value=result, label="Create database result" })
+end