From: Daniel Kahn Gillmor Date: Tue, 9 Mar 2010 03:58:46 +0000 (-0500) Subject: enable use of MSVA_PORT environment variable to choose the port X-Git-Tag: msva-perl/0.1~11 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=794f312541057eac59a4274822987407fafcc54d;p=monkeysphere-validation-agent.git enable use of MSVA_PORT environment variable to choose the port --- diff --git a/msva b/msva index 3b5ce80..fec119c 100755 --- a/msva +++ b/msva @@ -85,8 +85,14 @@ use strict; sub new { my $class = shift; + + my $port = 8901; + if (exists $ENV{MSVA_PORT}) { + $port = $ENV{MSVA_PORT} + 0; + die sprintf("not a reasonable port %d", $port) if (($port >= 65536) || $port <= 0); + } # start the server on port 8901 - my $self = $class->SUPER::new(8901); + my $self = $class->SUPER::new($port); $self->{allowed_uids} = {}; if (exists $ENV{MSVA_ALLOWED_USERS}) {