From b3d9577ceb069437be621c37d7884931c1855324 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 6 Feb 2025 14:34:47 +0000 Subject: prosodyctl: reload: Fix detection of whether prosody is running isrunning() returns two values (success, status) and we were only checking the first one. --- prosodyctl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/prosodyctl b/prosodyctl index 5e623e12..ff9c92b4 100755 --- a/prosodyctl +++ b/prosodyctl @@ -515,9 +515,11 @@ function commands.reload(arg) 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 -- cgit v1.2.3