mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-03-26 17:51:48 +01:00
parent
8f756e2d47
commit
f4d9d6e4df
@ -501,7 +501,7 @@ if [ "${mempoolExplorer}" == "on" ]; then
|
||||
fi
|
||||
|
||||
if [ "${runBehindTor}" == "on" ]; then
|
||||
OPTIONS+=(TOR "Update Tor from the source code")
|
||||
OPTIONS+=(TOR "Update Tor from the Torproject repo")
|
||||
fi
|
||||
|
||||
if [ "${itchysats}" == "on" ]; then
|
||||
|
@ -42,6 +42,21 @@ architecture=$(dpkg --print-architecture)
|
||||
|
||||
#### FUNCTIONS ####
|
||||
|
||||
add_tor_sources(){
|
||||
echo -e "\n*** Adding deb.torproject.org keyring ***"
|
||||
if ! curl -s -x socks5h://127.0.0.1:9050 --connect-timeout 10 "${tor_deb_repo_clean}/torproject.org/${tor_deb_repo_pgp_fingerprint}.asc" | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/torproject.gpg >/dev/null; then
|
||||
echo "!!! FAIL: Was not able to import deb.torproject.org key";
|
||||
exit 1
|
||||
fi
|
||||
echo "- OK key added"
|
||||
|
||||
echo -e "\n*** Adding Tor Sources ***"
|
||||
echo "
|
||||
deb [arch=${architecture}] ${tor_deb_repo}/torproject.org ${distribution} main
|
||||
deb-src [arch=${architecture}] ${tor_deb_repo}/torproject.org ${distribution} main
|
||||
" | sudo tee /etc/apt/sources.list.d/tor.list
|
||||
echo "- OK sources added"
|
||||
}
|
||||
|
||||
configure_default_torrc(){
|
||||
echo -e "\n*** updating Tor config ${torrc} ***"
|
||||
@ -140,19 +155,7 @@ if [ "${action}" = "install" ]; then
|
||||
# shellcheck disable=SC2086
|
||||
sudo apt install -y ${tor_pkgs}
|
||||
|
||||
echo -e "\n*** Adding deb.torproject.org keyring ***"
|
||||
if ! curl -s -x socks5h://127.0.0.1:9050 --connect-timeout 10 "${tor_deb_repo_clean}/torproject.org/${tor_deb_repo_pgp_fingerprint}.asc" | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/torproject.gpg >/dev/null; then
|
||||
echo "!!! FAIL: Was not able to import deb.torproject.org key";
|
||||
exit 1
|
||||
fi
|
||||
echo "- OK key added"
|
||||
|
||||
echo -e "\n*** Adding Tor Sources ***"
|
||||
echo "
|
||||
deb [arch=${architecture}] ${tor_deb_repo}/torproject.org ${distribution} main
|
||||
deb-src [arch=${architecture}] ${tor_deb_repo}/torproject.org ${distribution} main
|
||||
" | sudo tee /etc/apt/sources.list.d/tor.list
|
||||
echo "- OK sources added"
|
||||
add_tor_sources
|
||||
|
||||
echo -e "\n*** Reinstall ***"
|
||||
sudo apt update -y
|
||||
@ -286,7 +289,10 @@ if [ "${action}" = "update" ]; then
|
||||
sudo systemctl start tor
|
||||
echo "# Installed $(tor --version)"
|
||||
;;
|
||||
*) sudo apt update && sudo apt install tor && sudo systemctl restart tor;;
|
||||
*)
|
||||
add_tor_sources
|
||||
sudo apt update && sudo apt install tor && sudo systemctl restart tor
|
||||
;;
|
||||
esac
|
||||
echo
|
||||
exit
|
||||
|
Loading…
x
Reference in New Issue
Block a user