mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-04 10:43:49 +00:00
Revert "Revert "Change. Use require "resources.functions.config" to load co…"
This commit is contained in:
@@ -32,16 +32,14 @@
|
||||
debug["sql"] = false;
|
||||
|
||||
--include config.lua
|
||||
scripts_dir = string.sub(debug.getinfo(1).source,2,string.len(debug.getinfo(1).source)-(string.len(argv[0])+1));
|
||||
dofile(scripts_dir.."/resources/functions/config.lua");
|
||||
dofile(config());
|
||||
require "resources.functions.config";
|
||||
|
||||
--connect to the database
|
||||
if (file_exists(database_dir.."/core.db")) then
|
||||
--dbh = freeswitch.Dbh("core:core"); -- when using sqlite
|
||||
dbh = freeswitch.Dbh("sqlite://"..database_dir.."/core.db");
|
||||
else
|
||||
dofile(scripts_dir.."/resources/functions/database_handle.lua");
|
||||
require "resources.functions.database_handle";
|
||||
dbh = database_handle('switch');
|
||||
end
|
||||
|
||||
@@ -49,7 +47,7 @@
|
||||
api = freeswitch.API();
|
||||
|
||||
--add the function
|
||||
dofile(scripts_dir.."/resources/functions/trim.lua");
|
||||
require "resources.functions.trim";
|
||||
|
||||
--exits the script if we didn't connect properly
|
||||
assert(dbh:connected());
|
||||
|
||||
Reference in New Issue
Block a user