mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-20 13:02:21 +02:00
improve Tor detection
This commit is contained in:
@@ -273,14 +273,13 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
|||||||
echo ""
|
echo ""
|
||||||
echo "*** Check if Tor service is functional ***"
|
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)
|
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
|
if [ "${torRunning}" == "0" ]; then
|
||||||
clear
|
echo "Tor not running ... proceed with switching to Tor."
|
||||||
|
echo ""
|
||||||
|
else
|
||||||
echo "You are all good - Tor is already running."
|
echo "You are all good - Tor is already running."
|
||||||
echo ""
|
echo ""
|
||||||
exit 0
|
exit 0
|
||||||
else
|
|
||||||
echo "Tor not running ... proceed with switching to Tor."
|
|
||||||
echo ""
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# install package just in case it was deinstalled
|
# install package just in case it was deinstalled
|
||||||
|
Reference in New Issue
Block a user