Changeset

10868:fa06cf7059cd

util.prosodyctl.shell: Use same config option as module for socket path So now if you set it to a custom value, both the client and the server should use it.
author Kim Alvefur <zash@zash.se>
date Mon, 01 Jun 2020 23:53:03 +0200
parents 10867:561138169983
children 10869:c91697b81349
files util/prosodyctl/shell.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/prosodyctl/shell.lua	Mon Jun 01 23:26:30 2020 +0200
+++ b/util/prosodyctl/shell.lua	Mon Jun 01 23:53:03 2020 +0200
@@ -6,6 +6,7 @@
 	os.exit(1);
 end
 
+local config = require "core.configmanager";
 local server = require "net.server";
 local st = require "util.stanza";
 local path = require "util.paths";
@@ -113,7 +114,7 @@
 		end
 	end);
 
-	local socket_path = path.join(prosody.paths.data, "prosody.sock");
+	local socket_path = path.resolve_relative_path(prosody.paths.data, config.get("*", "admin_socket") or "prosody.sock");
 	local conn = connection(socket_path, client.listeners);
 	local ok, err = conn:connect();
 	if not ok then