Allow configuring local forwarded host
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
9b5933efcd
commit
0d0e9e83cb
1 changed files with 6 additions and 2 deletions
|
@ -12,14 +12,18 @@ shareport=$(which -a shareport | grep -v $0 | head -n1)
|
||||||
|
|
||||||
# Start argument array
|
# Start argument array
|
||||||
args=($shareport)
|
args=($shareport)
|
||||||
|
host=localhost
|
||||||
|
|
||||||
# Parse options
|
# Parse options
|
||||||
while getopts ":hp:v" o; do
|
while getopts ":hi:p:v" o; do
|
||||||
case "${o}" in
|
case "${o}" in
|
||||||
h)
|
h)
|
||||||
usage
|
usage
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
i)
|
||||||
|
host="${OPTARG}"
|
||||||
|
;;
|
||||||
p)
|
p)
|
||||||
args+=(--var "FQDN_PREFIX=${OPTARG}")
|
args+=(--var "FQDN_PREFIX=${OPTARG}")
|
||||||
;;
|
;;
|
||||||
|
@ -37,7 +41,7 @@ shift $((OPTIND - 1))
|
||||||
# Add port
|
# Add port
|
||||||
port="${1:-}"
|
port="${1:-}"
|
||||||
[[ -n $port ]] || fatal "Missing local port as first argument"
|
[[ -n $port ]] || fatal "Missing local port as first argument"
|
||||||
args+=(--local-addr "localhost:${port}")
|
args+=(--local-addr "${host}:${port}")
|
||||||
|
|
||||||
step "Fetching secrets..."
|
step "Fetching secrets..."
|
||||||
export IDENTITY_FILE=$(mktemp)
|
export IDENTITY_FILE=$(mktemp)
|
||||||
|
|
Loading…
Reference in a new issue