diff --git a/home.admin/_bootstrap.provision.sh b/home.admin/_bootstrap.provision.sh index 12a70be4f..0a228756c 100755 --- a/home.admin/_bootstrap.provision.sh +++ b/home.admin/_bootstrap.provision.sh @@ -232,7 +232,7 @@ fi # TOR if [ "${runBehindTor}" = "on" ]; then 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 else echo "Provisioning TOR - keep default" >> ${logFile} diff --git a/home.admin/config.scripts/internet.tor.sh b/home.admin/config.scripts/internet.tor.sh index e64d1f49e..690a6d732 100755 --- a/home.admin/config.scripts/internet.tor.sh +++ b/home.admin/config.scripts/internet.tor.sh @@ -7,7 +7,7 @@ # command info 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]" exit 1 fi @@ -44,6 +44,7 @@ fi # function: install keys & sources prepareTorSources() { + # Prepare for TOR service echo "*** INSTALL TOR REPO ***" echo "" @@ -193,12 +194,6 @@ if [ -f "/mnt/hdd/raspiblitz.conf" ]; then source /mnt/hdd/raspiblitz.conf 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 [ "$1" = "status" ]; then # is Tor activated @@ -251,6 +246,12 @@ fi if [ "$1" = "1" ] || [ "$1" = "on" ]; then 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 sudo sed -i "s/^runBehindTor=.*/runBehindTor=on/g" /mnt/hdd/raspiblitz.conf