diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/prosodyctl/shell.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util/prosodyctl/shell.lua b/util/prosodyctl/shell.lua index 1d312d3f..8c8769e2 100644 --- a/util/prosodyctl/shell.lua +++ b/util/prosodyctl/shell.lua @@ -10,6 +10,7 @@ local config = require "core.configmanager"; local server = require "net.server"; local st = require "util.stanza"; local path = require "util.paths"; +local parse_args = require "util.argparse".parse; local have_readline, readline = pcall(require, "readline"); @@ -91,6 +92,7 @@ end local function start(arg) --luacheck: ignore 212/arg local client = adminstream.client(); + local opts = parse_args(arg); client.events.add_handler("connected", function () if not arg.quiet then @@ -114,7 +116,7 @@ local function start(arg) --luacheck: ignore 212/arg end end); - local socket_path = path.resolve_relative_path(prosody.paths.data, prosody.opts.socket or config.get("*", "admin_socket") or "prosody.sock"); + local socket_path = path.resolve_relative_path(prosody.paths.data, opts.socket or config.get("*", "admin_socket") or "prosody.sock"); local conn = connection(socket_path, client.listeners); local ok, err = conn:connect(); if not ok then |