[go: up one dir, main page]

File: nmdc-redirector

package info (click to toggle)
uhub 0.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,016 kB
  • sloc: ansic: 12,630; xml: 588; sh: 356; perl: 233; makefile: 60
file content (20 lines) | stat: -rwxr-xr-x 483 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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 "<Redirector> You are being redirected to " . $target . "|";
print "\$ForceMove " . $target . "|";