Files
deb-websockify/other/wswrap
Joel Martin 2d15477fc7 Use /usr/bin/env shebang to make more crossplatform.
Based on noVNC pull request from Decorum.
2011-03-26 15:27:08 -05:00

23 lines
423 B
Bash
Executable File

#!/usr/bin/env bash
usage() {
echo "Usage: $(basename $0) PORT CMDLINE"
echo
echo " PORT Port to wrap with WebSockets support"
echo " CMDLINE Command line to wrap"
exit 2
}
# Parameter defaults
mydir=$(readlink -f $(dirname ${0}))
# Process parameters
#while [ "${1}" != "${1#-}" ]; do
# param=$1; shift
#done
export WSWRAP_PORT="${1}"; shift
LD_PRELOAD=${mydir}/wswrapper.so "${@}"