--- a/prosody Wed Sep 19 12:14:08 2012 +0100
+++ b/prosody Wed Sep 19 12:39:21 2012 +0100
@@ -228,6 +228,11 @@
prosody.installed = true;
end
+ if prosody.installed then
+ -- Change working directory to data path.
+ require "lfs".chdir(data_path);
+ end
+
-- Function to reload the config file
function prosody.reload_config()
log("info", "Reloading configuration file");
--- a/prosodyctl Wed Sep 19 12:14:08 2012 +0100
+++ b/prosodyctl Wed Sep 19 12:39:21 2012 +0100
@@ -50,6 +50,7 @@
platform = "posix";
lock_globals = function () end;
unlock_globals = function () end;
+ installed = CFG_SOURCEDIR ~= nil;
};
_G.prosody = prosody;
@@ -119,6 +120,11 @@
prosody.paths = { source = CFG_SOURCEDIR, config = CFG_CONFIGDIR,
plugins = CFG_PLUGINDIR or "plugins", data = data_path };
+if prosody.installed then
+ -- Change working directory to data path.
+ require "lfs".chdir(data_path);
+end
+
require "core.loggingmanager"
dependencies.log_warnings();