aboutsummaryrefslogtreecommitdiffstats
path: root/prosodyctl
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-01-10 23:11:28 +0000
committerMatthew Wild <mwild1@gmail.com>2010-01-10 23:11:28 +0000
commit82ca2f393bef2895ef09df70beac455bc28e4c45 (patch)
tree70077c5cd0e10b237e589a43f571e6210496bcde /prosodyctl
parent54f7dc1d2f0acd03c0682f2c98506a317eff4349 (diff)
downloadprosody-82ca2f393bef2895ef09df70beac455bc28e4c45.tar.gz
prosody-82ca2f393bef2895ef09df70beac455bc28e4c45.zip
prosodyctl: Move definition of prosody singleton to prior to loading datamanager, and add platform
Diffstat (limited to 'prosodyctl')
-rwxr-xr-xprosodyctl5
1 files changed, 3 insertions, 2 deletions
diff --git a/prosodyctl b/prosodyctl
index fd9bbe2f..407b10d4 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -60,6 +60,8 @@ do
end
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);
@@ -111,8 +113,7 @@ local error_messages = setmetatable({
local events = require "util.events".new();
-hosts = {};
-prosody = { hosts = hosts, events = events };
+hosts = prosody.hosts;
for hostname, config in pairs(config.getconfig()) do
hosts[hostname] = { events = events };