aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorJo?o Duarte <jvsDuarte08@gmail.com>2019-07-31 07:24:43 -0700
committerJo?o Duarte <jvsDuarte08@gmail.com>2019-07-31 07:24:43 -0700
commit62e70b82a16a91f7964a52b2fe15b8c8ffbafa4c (patch)
treed8b25af6fb253afb4de06ba31fde7c679e39ee13 /util
parentebb62190fb2ec32435be0074f84532d248f463f3 (diff)
downloadprosody-62e70b82a16a91f7964a52b2fe15b8c8ffbafa4c.tar.gz
prosody-62e70b82a16a91f7964a52b2fe15b8c8ffbafa4c.zip
util.prosodyctl: Added the call_luarocks function
Diffstat (limited to 'util')
-rw-r--r--util/prosodyctl.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/util/prosodyctl.lua b/util/prosodyctl.lua
index affa2f6b..22571061 100644
--- a/util/prosodyctl.lua
+++ b/util/prosodyctl.lua
@@ -306,6 +306,12 @@ local function check_flags(arg)
return false, arg[1]
end
+local function call_luarocks(operation, mod, dir)
+ show_message("Installing %s at %s", mod, dir);
+ os.execute("luarocks --tree='"..dir.."' --server='http://localhost/' "..operation.." "..mod);
+ show_module_configuration_help(mod);
+end
+
return {
show_message = show_message;
show_warning = show_message;
@@ -328,4 +334,5 @@ return {
reload = reload;
get_path_custom_plugins = get_path_custom_plugins;
check_flags = check_flags;
+ call_luarocks = call_luarocks;
};