4
echo "Usage: $(basename $0) OLD_PORT NEW_PORT COMMAND_LINE"
6
echo "Launch COMMAND_LINE, but intercept system calls to bind"
7
echo "to OLD_PORT and instead bind them to localhost:NEW_PORT"
12
mydir=$(readlink -f $(dirname ${0}))
14
export REBIND_PORT_OLD="${1}"; shift
15
export REBIND_PORT_NEW="${1}"; shift
17
LD_PRELOAD=${mydir}/rebind.so "${@}"