File: nmdc-redirector

package info (click to toggle)
uhub 0.4.1-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,420 kB
  • ctags: 2,241
  • sloc: ansic: 18,124; xml: 575; perl: 568; sh: 368; makefile: 24
file content (20 lines) | stat: -rwxr-xr-x 483 bytes parent folder | download | duplicates (6)
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 . "|";