From 794f312541057eac59a4274822987407fafcc54d Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Mon, 8 Mar 2010 22:58:46 -0500 Subject: [PATCH] enable use of MSVA_PORT environment variable to choose the port --- msva | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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}) { -- 2.26.2