mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-04-13 06:09:47 +02:00
#592 TOR on Setup
This commit is contained in:
parent
14fdc27157
commit
b9afd19f1d
@ -64,4 +64,18 @@ sudo /home/admin/config.scripts/blitz.setpassword.sh b
|
||||
|
||||
# success info dialog
|
||||
dialog --backtitle "RaspiBlitz" --msgbox "OK - RPC password changed \n\nNow starting the Setup of your RaspiBlitz." 7 52
|
||||
|
||||
###################
|
||||
# TOR BY DEFAULT
|
||||
# https://github.com/rootzoll/raspiblitz/issues/592
|
||||
###################
|
||||
|
||||
whiptail --title ' Privacy Level - How do you want to run your node? ' --yes-button='Public IP' --no-button='TOR NETWORK' --yesno "
|
||||
Running your node with your Public IP is the default but might reveal your personal identity and location.\n
|
||||
You can better protect your privacy with running your node as a Hidden Service within the TOR network, but that makes it harder to connect with other non-TOR nodes and remote mobile apps.
|
||||
" 14 75
|
||||
if [ $? -eq 1 ]; then
|
||||
echo "runBehindTor=on" >> /home/admin/raspiblitz.info
|
||||
fi
|
||||
|
||||
clear
|
@ -35,6 +35,14 @@ if [ ${mountOK} -eq 1 ]; then
|
||||
sudo chown -R bitcoin:bitcoin /home/bitcoin/.lnd
|
||||
echo "OK - ${network} setup ready"
|
||||
|
||||
###### ACTIVATE TOR IF SET DURING SETUP
|
||||
if [ "${runBehindTor}" = "on" ]; then
|
||||
echo "TOR was selected ..."
|
||||
sudo /home/admin/config.scripts/internet.tor.sh on
|
||||
else
|
||||
echo "TOR was not selected"
|
||||
fi
|
||||
|
||||
###### START NETWORK SERVICE
|
||||
echo ""
|
||||
echo "*** Start ${network} ***"
|
||||
|
@ -90,17 +90,28 @@ else
|
||||
fi
|
||||
echo ""
|
||||
|
||||
###### Start LND
|
||||
###### Init LND service & start
|
||||
|
||||
echo "*** Starting LND ***"
|
||||
echo "*** Init LND Service & Start ***"
|
||||
lndRunning=$(sudo systemctl status lnd.service 2>/dev/null | grep -c running)
|
||||
if [ ${lndRunning} -eq 0 ]; then
|
||||
|
||||
sudo systemctl stop lnd 2>/dev/null
|
||||
sudo systemctl disable lnd 2>/dev/null
|
||||
|
||||
sed -i "5s/.*/Wants=${network}d.service/" /home/admin/assets/lnd.service
|
||||
sed -i "6s/.*/After=${network}d.service/" /home/admin/assets/lnd.service
|
||||
sudo cp /home/admin/assets/lnd.service /etc/systemd/system/lnd.service
|
||||
sudo chmod +x /etc/systemd/system/lnd.service
|
||||
|
||||
###### ACTIVATE TOR IF SET DURING SETUP
|
||||
if [ "${runBehindTor}" = "on" ]; then
|
||||
echo "TOR was selected ..."
|
||||
sudo /home/admin/config.scripts/internet.tor.sh lndconf
|
||||
else
|
||||
echo "TOR was not selected"
|
||||
fi
|
||||
|
||||
sudo systemctl enable lnd
|
||||
sudo systemctl start lnd
|
||||
echo ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user