mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-11-18 18:07:45 +01:00
Use right public/testnet port for Litecoin
This commit is contained in:
@@ -110,12 +110,20 @@ local_ip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1
|
|||||||
public_ip=$(curl -s http://v4.ipv6-test.com/api/myip.php)
|
public_ip=$(curl -s http://v4.ipv6-test.com/api/myip.php)
|
||||||
public_port=$(cat ${bitcoin_dir}/${network}.conf 2>/dev/null | grep port= | awk -F"=" '{print $2}')
|
public_port=$(cat ${bitcoin_dir}/${network}.conf 2>/dev/null | grep port= | awk -F"=" '{print $2}')
|
||||||
if [ "${public_port}" = "" ]; then
|
if [ "${public_port}" = "" ]; then
|
||||||
|
if [ "${network}" = "litecoin" ]; then
|
||||||
|
if [ "${chain}" = "test" ]; then
|
||||||
|
public_port=19333
|
||||||
|
else
|
||||||
|
public_port=9333
|
||||||
|
fi
|
||||||
|
else
|
||||||
if [ "${chain}" = "test" ]; then
|
if [ "${chain}" = "test" ]; then
|
||||||
public_port=18333
|
public_port=18333
|
||||||
else
|
else
|
||||||
public_port=8333
|
public_port=8333
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
public_check=$(timeout 2s nc -z ${public_ip} ${public_port}; echo $?)
|
public_check=$(timeout 2s nc -z ${public_ip} ${public_port}; echo $?)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user