Revert "Revert "Change. Use require "resources.functions.config" to load co…"

This commit is contained in:
Alexey Melnichuk
2015-08-11 05:06:33 +03:00
parent 1615de1358
commit 3e16e69adb
69 changed files with 294 additions and 507 deletions

View File

@@ -31,16 +31,11 @@
local file = assert(io.open(tmp_file, "w"));
file:write("remove this file to stop the script");
--add the trim function
function trim(s)
return s:gsub("^%s+", ""):gsub("%s+$", "")
end
--define the trim function
require "resources.functions.trim"
--check if a file exists
function file_exists(name)
local f=io.open(name,"r")
if f~=nil then io.close(f) return true else return false end
end
require "resources.functions.file_exists"
--create the api object
api = freeswitch.API();