mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-10-10 04:43:10 +02:00
allow Tor update before setup (#1775)
This commit is contained in:
committed by
rootzoll
parent
faf53dbc94
commit
375c818f37
@@ -232,7 +232,7 @@ fi
|
|||||||
# TOR
|
# TOR
|
||||||
if [ "${runBehindTor}" = "on" ]; then
|
if [ "${runBehindTor}" = "on" ]; then
|
||||||
echo "Provisioning TOR - run config script" >> ${logFile}
|
echo "Provisioning TOR - run config script" >> ${logFile}
|
||||||
sudo sed -i "s/^message=.*/message='Setup TOR (takes time)'/g" ${infoFile}
|
sudo sed -i "s/^message=.*/message='Setup Tor (takes time)'/g" ${infoFile}
|
||||||
sudo /home/admin/config.scripts/internet.tor.sh on >> ${logFile} 2>&1
|
sudo /home/admin/config.scripts/internet.tor.sh on >> ${logFile} 2>&1
|
||||||
else
|
else
|
||||||
echo "Provisioning TOR - keep default" >> ${logFile}
|
echo "Provisioning TOR - keep default" >> ${logFile}
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
# command info
|
# command info
|
||||||
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||||
echo "small config script to switch TOR on or off"
|
echo "script to switch TOR on or off"
|
||||||
echo "internet.tor.sh [status|on|off|prepare|btcconf-on|btcconf-off|lndconf-on|update]"
|
echo "internet.tor.sh [status|on|off|prepare|btcconf-on|btcconf-off|lndconf-on|update]"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -44,6 +44,7 @@ fi
|
|||||||
# function: install keys & sources
|
# function: install keys & sources
|
||||||
prepareTorSources()
|
prepareTorSources()
|
||||||
{
|
{
|
||||||
|
|
||||||
# Prepare for TOR service
|
# Prepare for TOR service
|
||||||
echo "*** INSTALL TOR REPO ***"
|
echo "*** INSTALL TOR REPO ***"
|
||||||
echo ""
|
echo ""
|
||||||
@@ -193,12 +194,6 @@ if [ -f "/mnt/hdd/raspiblitz.conf" ]; then
|
|||||||
source /mnt/hdd/raspiblitz.conf
|
source /mnt/hdd/raspiblitz.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# make sure the network was set (by sourcing raspiblitz.conf)
|
|
||||||
if [ ${#network} -eq 0 ]; then
|
|
||||||
echo "FAIL - unknwon network due to missing /mnt/hdd/raspiblitz.conf"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# if started with status
|
# if started with status
|
||||||
if [ "$1" = "status" ]; then
|
if [ "$1" = "status" ]; then
|
||||||
# is Tor activated
|
# is Tor activated
|
||||||
@@ -251,6 +246,12 @@ fi
|
|||||||
if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||||
echo "switching the TOR ON"
|
echo "switching the TOR ON"
|
||||||
|
|
||||||
|
# make sure the network was set (by sourcing raspiblitz.conf)
|
||||||
|
if [ ${#network} -eq 0 ]; then
|
||||||
|
echo "FAIL - unknwon network due to missing /mnt/hdd/raspiblitz.conf"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# setting value in raspi blitz config
|
# setting value in raspi blitz config
|
||||||
sudo sed -i "s/^runBehindTor=.*/runBehindTor=on/g" /mnt/hdd/raspiblitz.conf
|
sudo sed -i "s/^runBehindTor=.*/runBehindTor=on/g" /mnt/hdd/raspiblitz.conf
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user