parse new csv files with 1st year students
[virtual-ldap] / bin / ldap-koha.pl
index d50ebbc..e97e1ef 100755 (executable)
@@ -8,16 +8,16 @@ use IO::Socket;
 use lib 'lib';
 use LDAP::Koha;
 
-my $port = 2389;
+my $listen = shift @ARGV || 'localhost:2389';
 
 my $sock = IO::Socket::INET->new(
        Listen => 5,
        Proto => 'tcp',
        Reuse => 1,
-       LocalPort => $port,
-) || die;
+       LocalAddr => $listen,
+) || die "can't listen to $listen $!";
 
-warn "# listening on $port";
+warn "# listening on $listen";
 
 my $sel = IO::Select->new($sock);
 my %Handlers;