mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-24 22:58:43 +01:00
#100 custom port in open testing and update
This commit is contained in:
parent
9f84c42ad3
commit
3517996fc1
2 changed files with 19 additions and 1 deletions
|
@ -215,6 +215,10 @@ ln_channelInfo="\n"
|
||||||
ln_external="\n"
|
ln_external="\n"
|
||||||
ln_alias="${hostname}"
|
ln_alias="${hostname}"
|
||||||
ln_publicColor=""
|
ln_publicColor=""
|
||||||
|
ln_port=$(sudo cat /mnt/hdd/lnd/lnd.conf | grep "^listen=*" | cut -f2 -d':')
|
||||||
|
if [ ${#ln_port} -eq 0 ]; then
|
||||||
|
ln_port="9735"
|
||||||
|
fi
|
||||||
|
|
||||||
wallet_unlocked=$(sudo tail -n 1 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log 2> /dev/null | grep -c unlock)
|
wallet_unlocked=$(sudo tail -n 1 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log 2> /dev/null | grep -c unlock)
|
||||||
if [ "$wallet_unlocked" -gt 0 ] ; then
|
if [ "$wallet_unlocked" -gt 0 ] ; then
|
||||||
|
@ -227,7 +231,7 @@ else
|
||||||
if [ ${ln_tor} -eq 1 ]; then
|
if [ ${ln_tor} -eq 1 ]; then
|
||||||
ln_publicColor="${color_green}"
|
ln_publicColor="${color_green}"
|
||||||
else
|
else
|
||||||
public_check=$(nc -z -w6 ${public_ip} 9735 2>/dev/null; echo $?)
|
public_check=$(nc -z -w6 ${public_ip} ${ln_port} 2>/dev/null; echo $?)
|
||||||
if [ $public_check = "0" ]; then
|
if [ $public_check = "0" ]; then
|
||||||
# only set yellow/normal because netcat can only say that the port is open - not that it points to this device for sure
|
# only set yellow/normal because netcat can only say that the port is open - not that it points to this device for sure
|
||||||
ln_publicColor="${color_yellow}"
|
ln_publicColor="${color_yellow}"
|
||||||
|
|
|
@ -156,6 +156,20 @@ else
|
||||||
echo "Provisioning TOR - keep default" >> ${logFile}
|
echo "Provisioning TOR - keep default" >> ${logFile}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# CUSTOM PORT
|
||||||
|
echo "Provisioning LND Port" >> ${logFile}
|
||||||
|
lndPort=$(sudo cat /mnt/hdd/lnd/lnd.conf | grep "^listen=*" | cut -f2 -d':')
|
||||||
|
if [ ${#lndPort} -gt 0 ]; then
|
||||||
|
if [ "${lndPort}" != "9735" ]; then
|
||||||
|
echo "User is running custom LND port: ${lndPort}" >> ${logFile}
|
||||||
|
sudo /home/admin/config.scripts/lnd.setport.sh ${lndPort} >> ${logFile} 2>&1
|
||||||
|
else
|
||||||
|
echo "User is running standard LND port: ${lndPort}" >> ${logFile}
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Was not able to get LND port from config." >> ${logFile}
|
||||||
|
fi
|
||||||
|
|
||||||
sudo sed -i "s/^message=.*/message='Setup Done'/g" ${infoFile}
|
sudo sed -i "s/^message=.*/message='Setup Done'/g" ${infoFile}
|
||||||
|
|
||||||
echo "DONE - Give raspi some cool off time after hard building .... 20 secs sleep" >> ${logFile}
|
echo "DONE - Give raspi some cool off time after hard building .... 20 secs sleep" >> ${logFile}
|
||||||
|
|
Loading…
Add table
Reference in a new issue