From 32747d4073af802505aee9fc3d601f595484cfeb Mon Sep 17 00:00:00 2001 From: rootzoll Date: Wed, 26 May 2021 10:05:59 -0500 Subject: [PATCH] test tor running --- home.admin/config.scripts/internet.tor.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/home.admin/config.scripts/internet.tor.sh b/home.admin/config.scripts/internet.tor.sh index 3ccd75639..cd7b158b0 100755 --- a/home.admin/config.scripts/internet.tor.sh +++ b/home.admin/config.scripts/internet.tor.sh @@ -272,9 +272,9 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then # check if Tor was already installed and is funtional echo "" echo "*** Check if Tor service is functional ***" - torRunning=$(curl --connect-timeout 10 --socks5-hostname 127.0.0.1:9050 https://check.torproject.org 2>/dev/null | grep -c "Congratulations. This browser is configured to use Tor.") - if [ "${torRunning}" == "0" ]; then - echo "Tor not running (${torRunning})... proceed with switching to Tor." + torRunningTest=$(curl --connect-timeout 10 --socks5-hostname 127.0.0.1:9050 https://check.torproject.org 2>/dev/null | grep -c "Congratulations. This browser is configured to use Tor.") + if [ "${torRunningTest}" == "0" ]; then + echo "Tor not running (${torRunningTest})... proceed with switching to Tor." echo "" else echo "You are all good - Tor is already running."