Changeset

13646:4e7ac0e8dfc4

prosodyctl: stop: Fix detection of whether Prosody is running
author Matthew Wild <mwild1@gmail.com>
date Thu, 06 Feb 2025 14:35:29 +0000
parents 13645:7f6f0e47624a
children 13647:2b3d49936518
files prosodyctl
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/prosodyctl	Thu Feb 06 14:34:47 2025 +0000
+++ b/prosodyctl	Thu Feb 06 14:35:29 2025 +0000
@@ -303,7 +303,11 @@
 
 	service_command_warning("stop");
 
-	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