prosody
changeset 5939 56d81af64fc5
parent 5843 fb6573e191cf
parent 5937 bcad61007a4e
child 6067 dab7ad6fa23c
--- a/prosody	Wed Dec 11 22:31:48 2013 +0000
+++ b/prosody	Fri Dec 13 12:52:39 2013 +0000
@@ -86,6 +86,7 @@
 			break;
 		end
 	end
+	prosody.config_file = filename
 	local ok, level, err = config.load(filename);
 	if not ok then
 		print("\n");
@@ -240,7 +241,7 @@
 	function prosody.reload_config()
 		log("info", "Reloading configuration file");
 		prosody.events.fire_event("reloading-config");
-		local ok, level, err = config.load((rawget(_G, "CFG_CONFIGDIR") or ".").."/prosody.cfg.lua");
+		local ok, level, err = config.load(prosody.config_file);
 		if not ok then
 			if level == "parser" then
 				log("error", "There was an error parsing the configuration file: %s", tostring(err));