diff options
author | Matthew Wild <mwild1@gmail.com> | 2025-02-06 14:34:47 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2025-02-06 14:34:47 +0000 |
commit | b3d9577ceb069437be621c37d7884931c1855324 (patch) | |
tree | a365826b95126607f09f6ad0ef84d567a952cdd4 | |
parent | f2e87307a4e861694b57aa2a13a7673fd67bd37b (diff) | |
download | prosody-b3d9577ceb069437be621c37d7884931c1855324.tar.gz prosody-b3d9577ceb069437be621c37d7884931c1855324.zip |
prosodyctl: reload: Fix detection of whether prosody is running
isrunning() returns two values (success, status) and we were only checking the
first one.
-rwxr-xr-x | prosodyctl | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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 |