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
|
||||
args=($shareport)
|
||||
host=localhost
|
||||
|
||||
# Parse options
|
||||
while getopts ":hp:v" o; do
|
||||
while getopts ":hi:p:v" o; do
|
||||
case "${o}" in
|
||||
h)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
i)
|
||||
host="${OPTARG}"
|
||||
;;
|
||||
p)
|
||||
args+=(--var "FQDN_PREFIX=${OPTARG}")
|
||||
;;
|
||||
|
@ -37,7 +41,7 @@ shift $((OPTIND - 1))
|
|||
# Add port
|
||||
port="${1:-}"
|
||||
[[ -n $port ]] || fatal "Missing local port as first argument"
|
||||
args+=(--local-addr "localhost:${port}")
|
||||
args+=(--local-addr "${host}:${port}")
|
||||
|
||||
step "Fetching secrets..."
|
||||
export IDENTITY_FILE=$(mktemp)
|
||||
|
|
Loading…
Reference in a new issue