From c00e6c31ec8bb34dc3b913d50c014b063ed8d79c Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Thu, 22 Jun 2017 23:51:13 +0200 Subject: Support server socket to passed in via ARGV[0] --- bin/telekinesis-client | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/telekinesis-client b/bin/telekinesis-client index 4a65b9c..29c76db 100755 --- a/bin/telekinesis-client +++ b/bin/telekinesis-client @@ -71,8 +71,15 @@ my $ACO = Arctica::Core::eventInit->new({ app_version=>'0.0.1.1'}); my $TeKiClient = Arctica::Telekinesis::Core::Client->new($ACO); -my $server_sock_id = $TeKiClient->get_tmp_servers_socket_id; +if ($#ARGV == -1) { + my $server_sock_id = $TeKiClient->get_tmp_servers_socket_id; +} else { + my $server_sock_id = $ARGV[0]; + if ($server_sock_id =~ /([a-zA-Z0-9]*)/) { + $server_sock_id = $1; + } else { die; } +} $TeKiClient->{'socks'}{'local'} = Arctica::Core::JABus::Socket->new($ACO,{ type => "unix", -- cgit v1.2.3