Comparison

util/prosodyctl.lua @ 10152:7e9c30eab11e

util.prosodyctl: Added the show_module_configuration_help function
author João Duarte <jvsDuarte08@gmail.com>
date Tue, 23 Jul 2019 10:24:55 -0700
parent 10148:263b61d03d70
child 10158:2cb48153f9e0
comparison
equal deleted inserted replaced
10151:e58034955002 10152:7e9c30eab11e
37 if desc then 37 if desc then
38 print(" "..desc); 38 print(" "..desc);
39 end 39 end
40 end 40 end
41 41
42 local function show_module_configuration_help(mod_name)
43 print("Done.")
44 print("If you installed a prosody plugin, don't forget to add its name under the 'modules_enabled' section inside your configuration file.")
45 print("Depending on the module, there might be further configuration steps required.")
46 print("")
47 print("More info about: ")
48 print(" modules_enabled: https://prosody.im/doc/modules_enabled")
49 print(" "..mod_name..": https://modules.prosody.im/"..mod_name..".html")
50 end
51
42 local function getchar(n) 52 local function getchar(n)
43 local stty_ret = os.execute("stty raw -echo 2>/dev/null"); 53 local stty_ret = os.execute("stty raw -echo 2>/dev/null");
44 local ok, char; 54 local ok, char;
45 if stty_ret == true or stty_ret == 0 then 55 if stty_ret == true or stty_ret == 0 then
46 ok, char = pcall(io.read, n or 1); 56 ok, char = pcall(io.read, n or 1);
301 311
302 return { 312 return {
303 show_message = show_message; 313 show_message = show_message;
304 show_warning = show_message; 314 show_warning = show_message;
305 show_usage = show_usage; 315 show_usage = show_usage;
316 show_module_configuration_help = show_module_configuration_help;
306 getchar = getchar; 317 getchar = getchar;
307 getline = getline; 318 getline = getline;
308 getpass = getpass; 319 getpass = getpass;
309 show_yesno = show_yesno; 320 show_yesno = show_yesno;
310 read_password = read_password; 321 read_password = read_password;