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 . "|"; +