X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;ds=sidebyside;f=util%2Fprosodyctl.lua;h=cc48d5907155a9eee8b5afe1183f55daaa8b0e28;hb=e29bf2590cc792999e9dc7ee5f197c71ef5dfd88;hp=b80a69f26eaafab55be94e4a2b47b65130e9818a;hpb=5a1000e8e61beb0c9ecf56ad9342d5b7031f9b49;p=prosody.git diff --git a/util/prosodyctl.lua b/util/prosodyctl.lua index b80a69f2..cc48d590 100644 --- a/util/prosodyctl.lua +++ b/util/prosodyctl.lua @@ -188,9 +188,13 @@ function getpid() if not pidfile then return false, "no-pidfile"; end + + if type(pidfile) ~= "string" then + return false, "invalid-pidfile"; + end - local modules_enabled = set.new(config.get("*", "modules_enabled")); - if not modules_enabled:contains("posix") then + local modules_enabled = set.new(config.get("*", "modules_disabled")); + if prosody.platform ~= "posix" or modules_enabled:contains("posix") then return false, "no-posix"; end