Browse Source

fix extraction forward port

sshtunnel
Christian Rotzoll 6 years ago
parent
commit
8dc8175e25
  1. 2
      home.admin/97addMobileWalletShango.sh
  2. 2
      home.admin/97addMobileWalletZap.sh

2
home.admin/97addMobileWalletShango.sh

@ -63,7 +63,7 @@ if [ ${#sshtunnel} -gt 0 ]; then
isForwarded=$(echo ${sshtunnel} | grep -c "10009<") isForwarded=$(echo ${sshtunnel} | grep -c "10009<")
if [ ${isForwarded} -gt 0 ]; then if [ ${isForwarded} -gt 0 ]; then
host=$(echo $sshtunnel | cut -d '@' -f2 | cut -d ' ' -f1) 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}" echo "port 10009 forwarding from port ${port} from server ${host}"
else else
echo "port 10009 is not part of the ssh forwarding - keep default port 10009" echo "port 10009 is not part of the ssh forwarding - keep default port 10009"

2
home.admin/97addMobileWalletZap.sh

@ -95,7 +95,7 @@ if [ ${#sshtunnel} -gt 0 ]; then
isForwarded=$(echo ${sshtunnel} | grep -c "10009<") isForwarded=$(echo ${sshtunnel} | grep -c "10009<")
if [ ${isForwarded} -gt 0 ]; then if [ ${isForwarded} -gt 0 ]; then
host=$(echo $sshtunnel | cut -d '@' -f2 | cut -d ' ' -f1) 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}" echo "port 10009 forwarding from port ${port} from server ${host}"
else else
echo "port 10009 is not part of the ssh forwarding - keep default port 10009" echo "port 10009 is not part of the ssh forwarding - keep default port 10009"

Loading…
Cancel
Save