aboutsummaryrefslogtreecommitdiffstats
path: root/util/prosodyctl/shell.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-06-01 23:26:30 +0200
committerKim Alvefur <zash@zash.se>2020-06-01 23:26:30 +0200
commitaa24574b89d9a766d7789da3ecb09c600157ff95 (patch)
tree49b8afece3c498f79ea061cc329234cbe727a56b /util/prosodyctl/shell.lua
parentaa8c162f111c2d0e2e5f9c20b2ea8e9588ed4e14 (diff)
downloadprosody-aa24574b89d9a766d7789da3ecb09c600157ff95.tar.gz
prosody-aa24574b89d9a766d7789da3ecb09c600157ff95.zip
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!
Diffstat (limited to 'util/prosodyctl/shell.lua')
-rw-r--r--util/prosodyctl/shell.lua4
1 files changed, 3 insertions, 1 deletions
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?");