aboutsummaryrefslogtreecommitdiffstats
path: root/prosody
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-09-19 12:39:21 +0100
committerMatthew Wild <mwild1@gmail.com>2012-09-19 12:39:21 +0100
commitf4bd74968a626f3e3aa1639c70dae2c2f33db39e (patch)
tree3abf83e55e8be8ee509ec6738437e8fdbb937e8b /prosody
parentfc11c75968dab816534939aafb2378dcd052c5e5 (diff)
downloadprosody-f4bd74968a626f3e3aa1639c70dae2c2f33db39e.tar.gz
prosody-f4bd74968a626f3e3aa1639c70dae2c2f33db39e.zip
prosody, prosodyctl: chdir() to data directory on startup
Diffstat (limited to 'prosody')
-rwxr-xr-xprosody5
1 files changed, 5 insertions, 0 deletions
diff --git a/prosody b/prosody
index b8de92f5..c1606874 100755
--- a/prosody
+++ b/prosody
@@ -228,6 +228,11 @@ function init_global_state()
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");