From e48051e7f3498b10fe9c0f8e64dc7da5ecd01828 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Wed, 25 Mar 2009 21:24:33 +0000 Subject: [PATCH 1/1] make listen address and port configurable as first option --- bin/ldap-koha.pl | 4 ++-- bin/ldap-rewrite.pl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/ldap-koha.pl b/bin/ldap-koha.pl index 40c64d6..e97e1ef 100755 --- a/bin/ldap-koha.pl +++ b/bin/ldap-koha.pl @@ -8,14 +8,14 @@ use IO::Socket; use lib 'lib'; use LDAP::Koha; -my $listen = '10.60.0.13:2389'; +my $listen = shift @ARGV || 'localhost:2389'; my $sock = IO::Socket::INET->new( Listen => 5, Proto => 'tcp', Reuse => 1, LocalAddr => $listen, -) || die; +) || die "can't listen to $listen $!"; warn "# listening on $listen"; diff --git a/bin/ldap-rewrite.pl b/bin/ldap-rewrite.pl index dd781c8..9c57242 100755 --- a/bin/ldap-rewrite.pl +++ b/bin/ldap-rewrite.pl @@ -20,7 +20,7 @@ use YAML qw/LoadFile/; my $config = { yaml_dir => './yaml/', - listen => 'localhost:1389', + listen => shift @ARGV || 'localhost:1389', upstream_ldap => 'ldap.ffzg.hr', upstream_ssl => 1, overlay_prefix => 'ffzg-', @@ -99,7 +99,7 @@ sub log_response { if ( defined $response->{protocolOp}->{searchResEntry} ) { my $uid = $response->{protocolOp}->{searchResEntry}->{objectName}; - warn "## SEARCH $uid"; + warn "## objectName $uid"; my @attrs; -- 2.20.1