Comparison

prosodyctl @ 4095:6ad7ed619d37

prosodyctl: Instead of calling datamanager.set_path(), just ensure prosody.paths.data always contains the correct value (including config)
author Matthew Wild <mwild1@gmail.com>
date Fri, 07 Jan 2011 11:56:52 +0000
parent 4065:2e03ded9b8e3
child 4142:caa78589598f
comparison
equal deleted inserted replaced
4094:38f3dfe88d4f 4095:6ad7ed619d37
107 end 107 end
108 end 108 end
109 local original_logging_config = config.get("*", "core", "log"); 109 local original_logging_config = config.get("*", "core", "log");
110 config.set("*", "core", "log", { { levels = { min="info" }, to = "console" } }); 110 config.set("*", "core", "log", { { levels = { min="info" }, to = "console" } });
111 111
112 local data_path = config.get("*", "core", "data_path") or CFG_DATADIR or "data";
113 prosody.paths = { source = CFG_SOURCEDIR, config = CFG_CONFIGDIR,
114 plugins = CFG_PLUGINDIR, data = data_path };
115
112 require "core.loggingmanager" 116 require "core.loggingmanager"
113 117
114 dependencies.log_warnings(); 118 dependencies.log_warnings();
115
116 local data_path = config.get("*", "core", "data_path") or CFG_DATADIR or "data";
117 require "util.datamanager".set_data_path(data_path);
118 119
119 -- Switch away from root and into the prosody user -- 120 -- Switch away from root and into the prosody user --
120 local switched_user, current_uid; 121 local switched_user, current_uid;
121 122
122 local want_pposix_version = "0.3.5"; 123 local want_pposix_version = "0.3.5";