From ab7c9e4a95fed6521053eb396f2a77b53e6facf3 Mon Sep 17 00:00:00 2001 From: openoms Date: Sun, 1 Aug 2021 15:10:41 +0100 Subject: [PATCH] Tor: reload only with -sighup , spelling fixes --- build_joininbox.sh | 2 +- scripts/_functions.sh | 2 +- scripts/install.hiddenservice.sh | 12 ++++++------ scripts/standalone/install.electrs.sh | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/build_joininbox.sh b/build_joininbox.sh index b536086..63fa76b 100644 --- a/build_joininbox.sh +++ b/build_joininbox.sh @@ -335,7 +335,7 @@ then 'https://deb.torproject.org/torproject.org') echo "torSourceListAvailable=${torSourceListAvailable}" if [ ${torSourceListAvailable} -eq 0 ]; then - echo "Adding TOR sources ..." + echo "Adding Tor sources ..." if [ "${baseImage}" = "raspbian" ]||[ "${baseImage}" = "buster" ]||[ "${baseImage}" = "dietpi" ]; then echo "deb https://deb.torproject.org/torproject.org buster main" | tee -a /etc/apt/sources.list echo "deb-src https://deb.torproject.org/torproject.org buster main" | tee -a /etc/apt/sources.list diff --git a/scripts/_functions.sh b/scripts/_functions.sh index de5ecda..52f3a69 100755 --- a/scripts/_functions.sh +++ b/scripts/_functions.sh @@ -329,7 +329,7 @@ function updateTor() { 'tor-nightly-master') echo "torSourceListAvailable=${torSourceListAvailable}" if [ ${torSourceListAvailable} -eq 0 ]; then - echo "Adding TOR sources ..." + echo "Adding Tor sources ..." if [ "${baseImage}" = "raspbian" ]||[ "${baseImage}" = "buster" ]||[ "${baseImage}" = "dietpi" ]; then distro="buster" elif [ "${baseImage}" = "bionic" ]; then diff --git a/scripts/install.hiddenservice.sh b/scripts/install.hiddenservice.sh index c373827..0280fad 100755 --- a/scripts/install.hiddenservice.sh +++ b/scripts/install.hiddenservice.sh @@ -34,9 +34,9 @@ if [ "$1" == "off" ]; then sudo chmod 644 /etc/tor/torrc sudo chown bitcoin:bitcoin /etc/tor/torrc - echo "# OK service is removed - restarting TOR ..." - sudo systemctl restart tor - sleep 10 + echo "# OK service is removed - reloading Tor ..." + sudo pkill -sighup tor + sleep 5 echo "# Done" exit 0 fi @@ -107,10 +107,10 @@ HiddenServicePort $toPort 127.0.0.1:$fromPort" | sudo tee -a /etc/tor/torrc fi # restart tor - echo "" - echo "Restarting Tor to activate the Hidden Service..." + echo + echo "Reloading Tor to activate the Hidden Service..." sudo chmod 644 /etc/tor/torrc - sudo systemctl restart tor + sudo pkill -sighup tor sleep 10 # show the Hidden Service address diff --git a/scripts/standalone/install.electrs.sh b/scripts/standalone/install.electrs.sh index 08baf9b..4341076 100755 --- a/scripts/standalone/install.electrs.sh +++ b/scripts/standalone/install.electrs.sh @@ -95,7 +95,7 @@ if [ "$1" = "status" ]; then # no answer on that port echo "publicHTTPPortAnswering=0" fi - # add TOR info + # add Tor info if [ "${runBehindTor}" == "on" ]; then echo "TORrunning=1" if [ "$2" = "showAddress" ]; then @@ -150,7 +150,7 @@ This can take multiple hours. exit 0 fi - # Options (available without TOR) + # Options (available without Tor) OPTIONS=( CONNECT "How to Connect" INDEX "Delete&Rebuild Index" @@ -178,7 +178,7 @@ This can take multiple hours. echo "The Tor Hidden Service address for electrs is (see LCD for QR code):" echo "${TORaddress}" echo - echo "To connect through TOR open the Tor Browser and start with the options:" + echo "To connect through Tor open the Tor Browser and start with the options:" echo "electrum --oneserver --server ${TORaddress}:50002:s --proxy socks5:127.0.0.1:9150" /home/admin/config.scripts/blitz.lcd.sh qr "${TORaddress}" fi