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"; |