mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-21 14:11:06 +02:00
fix extraction forward port
This commit is contained in:
@@ -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"
|
||||
|
@@ -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"
|
||||
|
Reference in New Issue
Block a user