# HG changeset patch # User Kim Alvefur # Date 1631391874 -7200 # Node ID 98ae952357750348a1d3f594662ac6042713f691 # Parent f4f0bdaeabd257f487995d97468fae812f3d13fa util.prosodyctl.check: Refuse to do ojn test unless prosody is running Other tests don't require a running prosody and I forgot to start it when testing. diff -r f4f0bdaeabd2 -r 98ae95235775 util/prosodyctl/check.lua --- a/util/prosodyctl/check.lua Wed May 06 18:20:33 2020 +0200 +++ b/util/prosodyctl/check.lua Sat Sep 11 22:24:34 2021 +0200 @@ -1,6 +1,7 @@ local configmanager = require "core.configmanager"; local show_usage = require "util.prosodyctl".show_usage; local show_warning = require "util.prosodyctl".show_warning; +local is_prosody_running = require "util.prosodyctl".isrunning; local dependencies = require "util.dependencies"; local socket = require "socket"; local jid_split = require "util.jid".prepped_split; @@ -723,6 +724,14 @@ end -- intentionally not doing this by default if what == "connectivity" then + print(is_prosody_running()) + local ok, prosody_is_running = is_prosody_running(); + if configmanager.get("*", "pidfile") and not prosody_is_running then + print("Prosody does not appear to be running, which is required for this test."); + print("Start it and then try again."); + return 1; + end + for host in it.filter(skip_bare_jid_hosts, enabled_hosts()) do local modules, component_module = modulemanager.get_modules_for_host(host); if component_module then