prosodyctl: Relocate global prosody object creation (see fff153f7f4de)

This commit is contained in:
Matthew Wild 2010-05-05 20:14:03 +01:00
parent c60b80b851
commit 6131215347

View file

@ -29,6 +29,14 @@ if CFG_DATADIR then
end
end
-- Global 'prosody' object
prosody = {
hosts = {},
events = require "util.events".new(),
platform = "posix"
};
local prosody = prosody;
config = require "core.configmanager"
do
@ -63,8 +71,6 @@ if not require "util.dependencies".check_dependencies() then
os.exit(1);
end
prosody = { hosts = {}, events = events, platform = "posix" };
local data_path = config.get("*", "core", "data_path") or CFG_DATADIR or "data";
require "util.datamanager".set_data_path(data_path);