prosodyctl
changeset 11299 50ea7d9143ad
parent 11298 a1939b261f67
child 11301 2e9d4c517919
equal deleted inserted replaced
11298:a1939b261f67 11299:50ea7d9143ad
    78 		show_usage([[install]], [[Installs a prosody/luarocks plugin]]);
    78 		show_usage([[install]], [[Installs a prosody/luarocks plugin]]);
    79 		return 1;
    79 		return 1;
    80 	end
    80 	end
    81 	show_message("Installing %s in %s", arg[1], prosody.paths.installer);
    81 	show_message("Installing %s in %s", arg[1], prosody.paths.installer);
    82 	-- TODO finalize config option name
    82 	-- TODO finalize config option name
    83 	local ret = call_luarocks("install", arg[1], configmanager.get("*", "plugin_server") or "http://localhost/");
    83 	local server = configmanager.get("*", "plugin_server");
       
    84 	if not server then
       
    85 		show_warning("There is no 'plugin_server' option in the configuration file");
       
    86 		-- see https://prosody.im/doc/TODO documentation
       
    87 		return 1;
       
    88 	end
       
    89 	local ret = call_luarocks("install", arg[1], server);
    84 	if ret == 0 and operation == "install" then
    90 	if ret == 0 and operation == "install" then
    85 		show_module_configuration_help(mod);
    91 		show_module_configuration_help(mod);
    86 	end
    92 	end
    87 	return ret;
    93 	return ret;
    88 end
    94 end