diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2017-06-22 23:51:13 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2017-06-22 23:53:20 +0200 |
commit | c00e6c31ec8bb34dc3b913d50c014b063ed8d79c (patch) | |
tree | 821a140bd72d159c84941ba3465ef87de0cc4753 | |
parent | 3f1822ac494b4f17da3fe0360e82d6fe2b9561f5 (diff) | |
download | perl-Arctica-Telekinesis-Client-c00e6c31ec8bb34dc3b913d50c014b063ed8d79c.tar.gz perl-Arctica-Telekinesis-Client-c00e6c31ec8bb34dc3b913d50c014b063ed8d79c.tar.bz2 perl-Arctica-Telekinesis-Client-c00e6c31ec8bb34dc3b913d50c014b063ed8d79c.zip |
Support server socket to passed in via ARGV[0]
-rwxr-xr-x | bin/telekinesis-client | 9 |
1 files changed, 8 insertions, 1 deletions
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", |