From 74a219135095c9c64d4e4ddc4c6411be87c81f5f Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Sun, 7 Feb 2010 23:37:21 +0100 Subject: [PATCH] Fix bug #111: Added nmdc-redirector similar to the adc-redirector. --- tools/nmdc-redirector | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 tools/nmdc-redirector diff --git a/tools/nmdc-redirector b/tools/nmdc-redirector new file mode 100755 index 0000000..d2a613d --- /dev/null +++ b/tools/nmdc-redirector @@ -0,0 +1,20 @@ +#!/usr/bin/perl -w + +# Setup using inetd/xinetd or similar. +# In /etc/inetd.conf add: +# 1511 stream tcp nowait nobody /usr/bin/nmdc-redirector adc://target:port +# +# Change port to whatever you want. +# Make sure the path and the target:port is correct, then you should be good +# to go! + +use strict; +use IO::Handle; +autoflush STDIN; +autoflush STDOUT; + +my $target = $ARGV[0]; + +print " You are being redirected to " . $target . "|"; +print "\$ForceMove " . $target . "|"; +