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
commitfef43e354399548ed548e992d18f17515d7bd087 (patch)
tree49b8afece3c498f79ea061cc329234cbe727a56b /util/prosodyctl/shell.lua
parentc2ec680ca72326ac47dca077a2a68157e05393a3 (diff)
downloadprosody-fef43e354399548ed548e992d18f17515d7bd087.tar.gz
prosody-fef43e354399548ed548e992d18f17515d7bd087.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?");