Software /
code /
prosody
Comparison
util/prosodyctl/shell.lua @ 10869:c91697b81349
util.prosodyctl.shell: Allow passing path to socket on command line
E.g. `prosodyctl shell --socket /path/to/prosody.scok`
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 01 Jun 2020 23:57:50 +0200 |
parent | 10868:fa06cf7059cd |
child | 10871:e5dee71d0ebb |
comparison
equal
deleted
inserted
replaced
10868:fa06cf7059cd | 10869:c91697b81349 |
---|---|
112 if stanza.name == "repl-result" then | 112 if stanza.name == "repl-result" then |
113 repl(client); | 113 repl(client); |
114 end | 114 end |
115 end); | 115 end); |
116 | 116 |
117 local socket_path = path.resolve_relative_path(prosody.paths.data, config.get("*", "admin_socket") or "prosody.sock"); | 117 local socket_path = path.resolve_relative_path(prosody.paths.data, arg.socket or config.get("*", "admin_socket") or "prosody.sock"); |
118 local conn = connection(socket_path, client.listeners); | 118 local conn = connection(socket_path, client.listeners); |
119 local ok, err = conn:connect(); | 119 local ok, err = conn:connect(); |
120 if not ok then | 120 if not ok then |
121 print("** Unable to connect to server - is it running? Is mod_admin_shell enabled?"); | 121 print("** Unable to connect to server - is it running? Is mod_admin_shell enabled?"); |
122 print("** Connection error: "..err); | 122 print("** Connection error: "..err); |