equal
deleted
inserted
replaced
48 hosts = {}; |
48 hosts = {}; |
49 events = require "util.events".new(); |
49 events = require "util.events".new(); |
50 platform = "posix"; |
50 platform = "posix"; |
51 lock_globals = function () end; |
51 lock_globals = function () end; |
52 unlock_globals = function () end; |
52 unlock_globals = function () end; |
|
53 installed = CFG_SOURCEDIR ~= nil; |
53 }; |
54 }; |
54 _G.prosody = prosody; |
55 _G.prosody = prosody; |
55 |
56 |
56 local dependencies = require "util.dependencies"; |
57 local dependencies = require "util.dependencies"; |
57 if not dependencies.check_dependencies() then |
58 if not dependencies.check_dependencies() then |
116 -- path1;path2;path3;defaultpath... |
117 -- path1;path2;path3;defaultpath... |
117 CFG_PLUGINDIR = table.concat(custom_plugin_paths, path_sep)..path_sep..(CFG_PLUGINDIR or "plugins"); |
118 CFG_PLUGINDIR = table.concat(custom_plugin_paths, path_sep)..path_sep..(CFG_PLUGINDIR or "plugins"); |
118 end |
119 end |
119 prosody.paths = { source = CFG_SOURCEDIR, config = CFG_CONFIGDIR, |
120 prosody.paths = { source = CFG_SOURCEDIR, config = CFG_CONFIGDIR, |
120 plugins = CFG_PLUGINDIR or "plugins", data = data_path }; |
121 plugins = CFG_PLUGINDIR or "plugins", data = data_path }; |
|
122 |
|
123 if prosody.installed then |
|
124 -- Change working directory to data path. |
|
125 require "lfs".chdir(data_path); |
|
126 end |
121 |
127 |
122 require "core.loggingmanager" |
128 require "core.loggingmanager" |
123 |
129 |
124 dependencies.log_warnings(); |
130 dependencies.log_warnings(); |
125 |
131 |