aboutsummaryrefslogtreecommitdiffstats
path: root/prosodyctl
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-05-05 20:14:03 +0100
committerMatthew Wild <mwild1@gmail.com>2010-05-05 20:14:03 +0100
commit61312153477a3517f03fccb37c078302ced77ac3 (patch)
tree9e08885ae81ddea861886391f13a0f167210c7f2 /prosodyctl
parentc60b80b85145981fa6bbf666c2fbd9c0578e7142 (diff)
downloadprosody-61312153477a3517f03fccb37c078302ced77ac3.tar.gz
prosody-61312153477a3517f03fccb37c078302ced77ac3.zip
prosodyctl: Relocate global prosody object creation (see fff153f7f4de)
Diffstat (limited to 'prosodyctl')
-rwxr-xr-xprosodyctl10
1 files changed, 8 insertions, 2 deletions
diff --git a/prosodyctl b/prosodyctl
index ccc1e2f9..52a96a75 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -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);