From fef43e354399548ed548e992d18f17515d7bd087 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 1 Jun 2020 23:26:30 +0200 Subject: util.prosodyctl.shell: Join socket path with current data directory Don't hardcode socket path as it happens to be in a source checkout. Hold on, it should use the same config option as the module! --- util/prosodyctl/shell.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'util/prosodyctl/shell.lua') diff --git a/util/prosodyctl/shell.lua b/util/prosodyctl/shell.lua index 3e70e8f1..6d5ea116 100644 --- a/util/prosodyctl/shell.lua +++ b/util/prosodyctl/shell.lua @@ -8,6 +8,7 @@ end local server = require "net.server"; local st = require "util.stanza"; +local path = require "util.paths"; local have_readline, readline = pcall(require, "readline"); @@ -112,7 +113,8 @@ local function start(arg) --luacheck: ignore 212/arg end end); - local conn = connection("data/prosody.sock", client.listeners); + local socket_path = path.join(prosody.paths.data, "prosody.sock"); + local conn = connection(socket_path, client.listeners); local ok, err = conn:connect(); if not ok then print("** Unable to connect to server - is it running? Is mod_admin_shell enabled?"); -- cgit v1.2.3