]> git.proxmox.com Git - mirror_novnc.git/blame - utils/rebind
Merge pull request #444 from samhed/extdesktop
[mirror_novnc.git] / utils / rebind
CommitLineData
40e5c25a 1#!/usr/bin/env bash
f2538f33
JM
2
3usage() {
4 echo "Usage: $(basename $0) OLD_PORT NEW_PORT COMMAND_LINE"
5 echo
6 echo "Launch COMMAND_LINE, but intercept system calls to bind"
7 echo "to OLD_PORT and instead bind them to localhost:NEW_PORT"
8 exit 2
9}
10
11# Parameter defaults
12mydir=$(readlink -f $(dirname ${0}))
13
14export REBIND_PORT_OLD="${1}"; shift
15export REBIND_PORT_NEW="${1}"; shift
16
17LD_PRELOAD=${mydir}/rebind.so "${@}"
18