233 -- path1;path2;path3;defaultpath... |
233 -- path1;path2;path3;defaultpath... |
234 -- luacheck: ignore 111 |
234 -- luacheck: ignore 111 |
235 CFG_PLUGINDIR = table.concat(custom_plugin_paths, path_sep)..path_sep..(CFG_PLUGINDIR or "plugins"); |
235 CFG_PLUGINDIR = table.concat(custom_plugin_paths, path_sep)..path_sep..(CFG_PLUGINDIR or "plugins"); |
236 prosody.paths.plugins = CFG_PLUGINDIR; |
236 prosody.paths.plugins = CFG_PLUGINDIR; |
237 end |
237 end |
238 if installer_plugin_paths then |
238 for path, _ in ipairs(installer_plugin_paths) do |
239 for path, _ in ipairs(installer_plugin_paths) do |
239 if os.execute('[ -d "'..installer_plugin_paths[path]..'" ]') ~= 0 then |
240 if os.execute('[ -d "'..installer_plugin_paths[path]..'" ]') ~= 0 then |
240 os.execute("mkdir "..installer_plugin_paths[path]) |
241 os.execute("mkdir "..installer_plugin_paths[path]) |
241 end |
242 end |
242 end |
243 end |
243 local path_sep = package.config:sub(3,3); |
244 local path_sep = package.config:sub(3,3); |
244 -- luacheck: ignore 111 |
245 -- luacheck: ignore 111 |
245 CFG_PLUGINDIR = table.concat(installer_plugin_paths, path_sep)..path_sep..(CFG_PLUGINDIR or "plugins"); |
246 CFG_PLUGINDIR = table.concat(installer_plugin_paths, path_sep)..path_sep..(CFG_PLUGINDIR or "plugins"); |
246 prosody.paths.plugins = CFG_PLUGINDIR; |
247 prosody.paths.plugins = CFG_PLUGINDIR; |
|
248 end |
|
249 end |
247 end |
250 |
248 |
251 function startup.chdir() |
249 function startup.chdir() |
252 if prosody.installed then |
250 if prosody.installed then |
253 -- Change working directory to data path. |
251 -- Change working directory to data path. |