From afb5b682d198cb2517a5dc668436eb0547955cbc Mon Sep 17 00:00:00 2001
From: Kim Alvefur <zash@zash.se>
Date: Mon, 24 Apr 2017 16:24:28 +0200
Subject: util.prosodyctl: Resolve possibly relative pidfile path (fixes
 inconsistency with mod_posix)

---
 util/prosodyctl.lua | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/util/prosodyctl.lua b/util/prosodyctl.lua
index 7c9a3c19..8ae051ae 100644
--- a/util/prosodyctl.lua
+++ b/util/prosodyctl.lua
@@ -187,6 +187,8 @@ local function getpid()
 		return false, "invalid-pidfile";
 	end
 
+	pidfile = config.resolve_relative_path(prosody.paths.data, pidfile);
+
 	local modules_enabled = set.new(config.get("*", "modules_disabled"));
 	if prosody.platform ~= "posix" or modules_enabled:contains("posix") then
 		return false, "no-posix";
-- 
cgit v1.2.3