diff options
Diffstat (limited to 'freeswitch-model.lua')
-rw-r--r-- | freeswitch-model.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/freeswitch-model.lua b/freeswitch-model.lua index 149bf32..3c2cb95 100644 --- a/freeswitch-model.lua +++ b/freeswitch-model.lua @@ -12,6 +12,8 @@ local processname = "freeswitch" local packagename = "freeswitch" local baseurl = "/etc/freeswitch" +local path = "PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin " + -- ################################################################################ -- LOCAL FUNCTIONS @@ -31,6 +33,13 @@ function startstop_service(action) return modelfunctions.startstop_service(processname, action, {"Start", "Stop", "Restart"}) end +function reload_xml() + local f = io.popen(path.."fs_cli -x reloadxml 2>&1") + local result = f:read("*a") + f:close() + return cfe({ value=result, label="Freeswitch Reload XML result" }) +end + get_file = function(filename) return modelfunctions.getfiledetails(filename, is_valid_filename) end |