Changeset

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
parents 11689:f9f6e82fb572
children 11691:a6c18f434d7b
files prosodyctl
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/prosodyctl	Wed Jul 14 22:27:12 2021 +0200
+++ b/prosodyctl	Sun May 30 12:27:12 2021 +0200
@@ -662,7 +662,14 @@
 				"start"; "stop"; "restart"; "reload"; "status";
 			"Informative:",
 				"about",
+				"check",
 		};
+		-- These live in util.prosodyctl.$command so we have their short help here.
+		local external_commands = {
+			cert = "Manage certificates",
+			check = "Perform basic checks on your Prosody installation",
+			shell = "Lorem ipsum dolor sit amet", -- FIXME
+		}
 
 		local done = {};
 
@@ -671,6 +678,9 @@
 			if command_func then
 				command_func{ "--help" };
 				done[command_name] = true;
+			elseif external_commands[command_name] then
+				show_usage(command_name, external_commands[command_name]);
+				done[command_name] = true;
 			else
 				print""
 				print(command_name);