From 5bf3546e4555786aea883aafdb6bb7ee9f8a5713 Mon Sep 17 00:00:00 2001 From: Ville Rantanen Date: Mon, 13 Nov 2023 13:04:38 +0200 Subject: [PATCH] list tunnels with urls --- web/ssh-tunnelier | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/ssh-tunnelier b/web/ssh-tunnelier index a8de86d..8076ea5 100755 --- a/web/ssh-tunnelier +++ b/web/ssh-tunnelier @@ -139,6 +139,11 @@ function read_config() { id=$( get_id "$line" ) pid=$( get_pid "$id" ) printf "%-3d %-7s %s\n" $i "$pid" "$line" | sed 's,:localhost:,:'$LOCALHOSTSYMBOL':,g' + if [[ "$LISTONLY" -eq 1 ]]; then + if [[ -n "$pid" ]]; then + echo "$line" | parse_switches 2>/dev/stdout 1>/dev/null | sed 's,^Generated , ,' + fi + fi ids+=( $id ) i=$(( i + 1 )) done < <( grep -v ^# "$CONF" | grep '[a-zA-Z]' )