From 315e0fa73078a8ebd06325549d790da58845f692 Mon Sep 17 00:00:00 2001 From: gStart9 Date: Thu, 24 Apr 2025 15:43:07 -0600 Subject: [PATCH] Simplify tor repo guide for CentOS/RHEL/Fedora --- site/source/device-guides/linux/tor-linux.rst | 28 ++++++------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/site/source/device-guides/linux/tor-linux.rst b/site/source/device-guides/linux/tor-linux.rst index 70963c8..360f129 100644 --- a/site/source/device-guides/linux/tor-linux.rst +++ b/site/source/device-guides/linux/tor-linux.rst @@ -53,34 +53,22 @@ Using Tor on Linux .. group-tab:: CentOS / Fedora / RHEL - #. Configure the Tor Package repository. Add the following to ``/etc/yum.repos.d/tor.repo``: + #. Configure the Tor Package repository - - CentOS / RHEL: + Paste the following lines into a shell/Terminal session: .. code-block:: bash + os=$(cat /etc/os-release|grep "^ID="|cut -d= -f2|sed "s/\"//g") && \ + sudo cat << EOF > /etc/yum.repos.d/tor.repo [Tor] - name=Tor for Enterprise Linux $releasever - $basearch - baseurl=https://rpm.torproject.org/centos/$releasever/$basearch + name=Tor for $os \$releasever - \$basearch + baseurl=https://rpm.torproject.org/$os/\$releasever/\$basearch enabled=1 gpgcheck=1 - gpgkey=https://rpm.torproject.org/centos/public_gpg.key - cost=100 - - - - Fedora: - - .. tip:: Latest Fedora versions have Tor package available for installation: - - .. code-block:: bash - - [Tor] - name=Tor for Fedora $releasever - $basearch - baseurl=https://rpm.torproject.org/fedora/$releasever/$basearch - enabled=1 - gpgcheck=1 - gpgkey=https://rpm.torproject.org/fedora/public_gpg.key + gpgkey=https://rpm.torproject.org/$os/public_gpg.key cost=100 + EOF #. Install the Tor package: