Software / code / prosody
Comparison
prosodyctl @ 11690:4e36a1e7222b
prosodyctl: Add 'check' to command listing (fixes #1622)
Along with infrastructure for the other commands that live in external
modules.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 30 May 2021 12:27:12 +0200 |
| parent | 11587:ce7c52a6d650 |
| child | 11691:a6c18f434d7b |
comparison
equal
deleted
inserted
replaced
| 11689:f9f6e82fb572 | 11690:4e36a1e7222b |
|---|---|
| 660 "adduser"; "passwd"; "deluser"; | 660 "adduser"; "passwd"; "deluser"; |
| 661 "Process management:", | 661 "Process management:", |
| 662 "start"; "stop"; "restart"; "reload"; "status"; | 662 "start"; "stop"; "restart"; "reload"; "status"; |
| 663 "Informative:", | 663 "Informative:", |
| 664 "about", | 664 "about", |
| 665 "check", | |
| 665 }; | 666 }; |
| 667 -- These live in util.prosodyctl.$command so we have their short help here. | |
| 668 local external_commands = { | |
| 669 cert = "Manage certificates", | |
| 670 check = "Perform basic checks on your Prosody installation", | |
| 671 shell = "Lorem ipsum dolor sit amet", -- FIXME | |
| 672 } | |
| 666 | 673 |
| 667 local done = {}; | 674 local done = {}; |
| 668 | 675 |
| 669 for _, command_name in ipairs(commands_order) do | 676 for _, command_name in ipairs(commands_order) do |
| 670 local command_func = commands[command_name]; | 677 local command_func = commands[command_name]; |
| 671 if command_func then | 678 if command_func then |
| 672 command_func{ "--help" }; | 679 command_func{ "--help" }; |
| 673 done[command_name] = true; | 680 done[command_name] = true; |
| 681 elseif external_commands[command_name] then | |
| 682 show_usage(command_name, external_commands[command_name]); | |
| 683 done[command_name] = true; | |
| 674 else | 684 else |
| 675 print"" | 685 print"" |
| 676 print(command_name); | 686 print(command_name); |
| 677 end | 687 end |
| 678 end | 688 end |