From 8dc8175e255525a43830962133eced07cf678896 Mon Sep 17 00:00:00 2001 From: Christian Rotzoll Date: Wed, 3 Apr 2019 14:59:19 +0100 Subject: [PATCH] fix extraction forward port --- home.admin/97addMobileWalletShango.sh | 2 +- home.admin/97addMobileWalletZap.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/home.admin/97addMobileWalletShango.sh b/home.admin/97addMobileWalletShango.sh index bad539ab5..f1409ff61 100644 --- a/home.admin/97addMobileWalletShango.sh +++ b/home.admin/97addMobileWalletShango.sh @@ -63,7 +63,7 @@ if [ ${#sshtunnel} -gt 0 ]; then isForwarded=$(echo ${sshtunnel} | grep -c "10009<") if [ ${isForwarded} -gt 0 ]; then host=$(echo $sshtunnel | cut -d '@' -f2 | cut -d ' ' -f1) - port=$(echo $sshtunnel | awk '{split($0,a,"10009<"); print a[2]}' | cut -d ' ' -f1) + port=$(echo $sshtunnel | awk '{split($0,a,"10009<"); print a[2]}' | cut -d ' ' -f1 | sed 's/[^0-9]//g') echo "port 10009 forwarding from port ${port} from server ${host}" else echo "port 10009 is not part of the ssh forwarding - keep default port 10009" diff --git a/home.admin/97addMobileWalletZap.sh b/home.admin/97addMobileWalletZap.sh index a6a415b40..26e21bd4e 100755 --- a/home.admin/97addMobileWalletZap.sh +++ b/home.admin/97addMobileWalletZap.sh @@ -95,7 +95,7 @@ if [ ${#sshtunnel} -gt 0 ]; then isForwarded=$(echo ${sshtunnel} | grep -c "10009<") if [ ${isForwarded} -gt 0 ]; then host=$(echo $sshtunnel | cut -d '@' -f2 | cut -d ' ' -f1) - port=$(echo $sshtunnel | awk '{split($0,a,"10009<"); print a[2]}' | cut -d ' ' -f1) + port=$(echo $sshtunnel | awk '{split($0,a,"10009<"); print a[2]}' | cut -d ' ' -f1 | sed 's/[^0-9]//g') echo "port 10009 forwarding from port ${port} from server ${host}" else echo "port 10009 is not part of the ssh forwarding - keep default port 10009"