tor-support: update

This commit is contained in:
Jesús 2021-08-10 19:57:57 -05:00
parent c913805074
commit 3b7e6caa66
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766

View File

@ -14,7 +14,7 @@ EOF
if pgrep tor > /dev/null 2>&1; then
checkurl=$(curl --socks5 "localhost:${TOR_PORT:-9050}" -o /dev/null 2>&1 -s -w "%{http_code}\n" "${URL_CHECK:-https://www.youtube.com/results?search_query=rms}")
case ${checkurl} in
302|502) pkill tor > /dev/null 2>&1 && tor -f /etc/tor/torrc --runasdaemon 1 ;;
302|502|500) pkill tor > /dev/null 2>&1 && tor -f /etc/tor/torrc --runasdaemon 1 ;;
esac
else
tor -f /etc/tor/torrc --runasdaemon 1