Diff

prosodyctl @ 13645:7f6f0e47624a

prosodyctl: reload: Fix detection of whether prosody is running isrunning() returns two values (success, status) and we were only checking the first one.
author Matthew Wild <mwild1@gmail.com>
date Thu, 06 Feb 2025 14:34:47 +0000
parent 13644:263ae995bc86
child 13646:4e7ac0e8dfc4
line wrap: on
line diff
--- a/prosodyctl	Thu Feb 06 14:24:16 2025 +0000
+++ b/prosodyctl	Thu Feb 06 14:34:47 2025 +0000
@@ -515,9 +515,11 @@
 		return shell.shell({ "config", "reload" });
 	end
 
-	service_command_warning("reload");
-
-	if not prosodyctl.isrunning() then
+	local ok, running = prosodyctl.isrunning();
+	if not ok then
+		show_message(error_messages[running]);
+		return 1;
+	elseif not running then
 		show_message("Prosody is not running");
 		return 1;
 	end