mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Change. Use require "resources.functions.config" to load config file.
Change. Move `script_dir` definition into config file.
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
--get the scripts directory and include the 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";
|
||||
|
||||
--additional includes
|
||||
dofile(scripts_dir.."/resources/functions/file_exists.lua");
|
||||
|
||||
@@ -26,9 +26,7 @@
|
||||
api = freeswitch.API();
|
||||
|
||||
--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
|
||||
dofile(scripts_dir.."/resources/functions/database_handle.lua");
|
||||
|
||||
@@ -44,11 +44,6 @@
|
||||
tries = 0;
|
||||
profile = "internal";
|
||||
|
||||
--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());
|
||||
|
||||
--connect to the database
|
||||
dofile(scripts_dir.."/resources/functions/database_handle.lua");
|
||||
dbh = database_handle('system');
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
-- Mark J Crane <markjcrane@fusionpbx.com>
|
||||
|
||||
--include config.lua
|
||||
scripts_dir = string.sub(debug.getinfo(1).source,2,string.len(debug.getinfo(1).source)-(string.len(argv[0])+1));
|
||||
require "resources.functions.config";
|
||||
|
||||
--set variables
|
||||
max_tries = "3";
|
||||
|
||||
@@ -24,9 +24,7 @@
|
||||
-- POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
--include the lua script
|
||||
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";
|
||||
|
||||
--define general settings
|
||||
sleep = 300;
|
||||
|
||||
Reference in New Issue
Block a user