From 4864fc5dcf0279e2bfc4266347fd372a5164ef0f Mon Sep 17 00:00:00 2001 From: rootzoll Date: Wed, 26 May 2021 10:01:42 -0500 Subject: [PATCH] improve Tor detection --- home.admin/config.scripts/internet.tor.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/home.admin/config.scripts/internet.tor.sh b/home.admin/config.scripts/internet.tor.sh index 2666efa57..77025e353 100755 --- a/home.admin/config.scripts/internet.tor.sh +++ b/home.admin/config.scripts/internet.tor.sh @@ -273,14 +273,13 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then 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 "Congratulations. This browser is configured to use Tor." -c) - if [ ${torRunning} -gt 0 ]; then - clear + if [ "${torRunning}" == "0" ]; then + echo "Tor not running ... proceed with switching to Tor." + echo "" + else echo "You are all good - Tor is already running." echo "" exit 0 - else - echo "Tor not running ... proceed with switching to Tor." - echo "" fi # install package just in case it was deinstalled