Browse Source

fix getting forward port

sshtunnel
Christian Rotzoll 6 years ago
parent
commit
793f6d3ddd
  1. 5
      home.admin/97addMobileWalletShango.sh
  2. 2
      home.admin/97addMobileWalletZap.sh

5
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]}' | sed 's/[^0-9]//g') port=$(echo $sshtunnel | awk '{split($0,a,"10009<"); print a[2]}' | cut -d ' ' -f1)
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"
@ -82,4 +82,5 @@ clear
echo "Now press 'Connect' within the Shango Wallet." echo "Now press 'Connect' within the Shango Wallet."
echo "If its not working - check issues on GitHub:" echo "If its not working - check issues on GitHub:"
echo "https://github.com/neogeno/shango-lightning-wallet/issues" echo "https://github.com/neogeno/shango-lightning-wallet/issues"
echo "" echo ""

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]}' | sed 's/[^0-9]//g') port=$(echo $sshtunnel | awk '{split($0,a,"10009<"); print a[2]}' | cut -d ' ' -f1)
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