From b60081c28ce425696a3839d10039f23d6250e840 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Duarte?= Date: Wed, 31 Jul 2019 07:24:43 -0700 Subject: util.prosodyctl: Added the call_luarocks function --- util/prosodyctl.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'util/prosodyctl.lua') 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; }; -- cgit v1.2.3