diff options
author | Ted Trask <ttrask01@yahoo.com> | 2011-01-08 20:30:37 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2011-01-08 20:30:37 +0000 |
commit | 802b8d7fe548afad99235db73b9c7ffea64c011b (patch) | |
tree | a1d64e28d450aa61e6fdefa9565e79b28e36d1bf /kamailio-model.lua | |
parent | 7737dbd5def8fe3f38553e6e5c91bfc389fcae64 (diff) | |
download | acf-kamailio-802b8d7fe548afad99235db73b9c7ffea64c011b.tar.bz2 acf-kamailio-802b8d7fe548afad99235db73b9c7ffea64c011b.tar.xz |
Added createdatabase action.
Diffstat (limited to 'kamailio-model.lua')
-rw-r--r-- | kamailio-model.lua | 7 |
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 |