aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2011-02-24 01:35:33 +0000
committerMatthew Wild <mwild1@gmail.com>2011-02-24 01:35:33 +0000
commit1363993367e468526666d1255df469b4150506bd (patch)
treedf2b1f1779aeef4dab4373af66f628293a57d9a8
parentba01859e1ce26869d0871f891a686e3c89ceaf44 (diff)
downloadprosody-1363993367e468526666d1255df469b4150506bd.tar.gz
prosody-1363993367e468526666d1255df469b4150506bd.zip
prosody, prosodyctl: Use plugin_paths in addition to, not instead of, the default plugin path
-rwxr-xr-xprosody6
-rwxr-xr-xprosodyctl6
2 files changed, 8 insertions, 4 deletions
diff --git a/prosody b/prosody
index 81d87153..0aba4bb6 100755
--- a/prosody
+++ b/prosody
@@ -186,10 +186,12 @@ function init_global_state()
local data_path = config.get("*", "core", "data_path") or CFG_DATADIR or "data";
local custom_plugin_paths = config.get("*", "core", "plugin_paths");
if custom_plugin_paths then
- CFG_PLUGINDIR = table.concat(custom_plugin_paths, package.config:sub(3,3)); -- path1;path2;path3
+ local path_sep = package.config:sub(3,3);
+ -- path1;path2;path3;defaultpath...
+ CFG_PLUGINDIR = table.concat(custom_plugin_paths, path_sep)..path_sep..(CFG_PLUGINDIR or "plugins");
end
prosody.paths = { source = CFG_SOURCEDIR, config = CFG_CONFIGDIR,
- plugins = CFG_PLUGINDIR, data = data_path };
+ plugins = CFG_PLUGINDIR or "plugins", data = data_path };
prosody.arg = _G.arg;
diff --git a/prosodyctl b/prosodyctl
index 2005a3ed..8fdf3488 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -112,10 +112,12 @@ config.set("*", "core", "log", { { levels = { min="info" }, to = "console" } });
local data_path = config.get("*", "core", "data_path") or CFG_DATADIR or "data";
local custom_plugin_paths = config.get("*", "core", "plugin_paths");
if custom_plugin_paths then
- CFG_PLUGINDIR = table.concat(custom_plugin_paths, package.config:sub(3,3)); -- path1;path2;path3
+ local path_sep = package.config:sub(3,3);
+ -- path1;path2;path3;defaultpath...
+ CFG_PLUGINDIR = table.concat(custom_plugin_paths, path_sep)..path_sep..(CFG_PLUGINDIR or "plugins");
end
prosody.paths = { source = CFG_SOURCEDIR, config = CFG_CONFIGDIR,
- plugins = CFG_PLUGINDIR, data = data_path };
+ plugins = CFG_PLUGINDIR or "plugins", data = data_path };
require "core.loggingmanager"