Software /
code /
prosody
Changeset
10867:561138169983
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!
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 01 Jun 2020 23:26:30 +0200 |
parents | 10866:5265f7fe11dd |
children | 10868:fa06cf7059cd |
files | util/prosodyctl/shell.lua |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/util/prosodyctl/shell.lua Mon Jun 01 23:17:20 2020 +0200 +++ b/util/prosodyctl/shell.lua Mon Jun 01 23:26:30 2020 +0200 @@ -8,6 +8,7 @@ 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 @@ 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?");