From f94e7baba58f132cb25104901b41f6c3f115d082 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Vanhalle Date: Fri, 11 Oct 2024 23:21:23 +0200 Subject: [PATCH] reuses TRAEFIK_LISTENING_IP env variable --- env_files/ssh-tunnel-example.env | 1 - start-ssh-tunnel.sh | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/env_files/ssh-tunnel-example.env b/env_files/ssh-tunnel-example.env index 4e2851f..7a25303 100644 --- a/env_files/ssh-tunnel-example.env +++ b/env_files/ssh-tunnel-example.env @@ -1,4 +1,3 @@ -local_ip=192.168.2.109 local_ip_on_remote=localhost local_port=5432 local_port_on_remote=5432 diff --git a/start-ssh-tunnel.sh b/start-ssh-tunnel.sh index 4609fad..e2f4084 100644 --- a/start-ssh-tunnel.sh +++ b/start-ssh-tunnel.sh @@ -13,10 +13,12 @@ fi # shellcheck source=./env_files/ssh-tunnel-example.env . "${1}" +# shellcheck source=./.env-example +. ./.env ssh \ -v \ -N \ -L \ - "${local_ip}:${local_port}:${local_ip_on_remote}:${local_port_on_remote}" \ + "${TRAEFIK_LISTENING_IP}:${local_port}:${local_ip_on_remote}:${local_port_on_remote}" \ "${remote_host}"