diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-12-15 18:09:03 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-12-15 18:09:03 +0000 |
commit | 7bc9c63c9da678a7e6fceb095d56c634afd22c56 (patch) | |
tree | 4a67d50a439e9af63947e5f8b6ba3719af98b6c9 /net-vpn/tor/files | |
parent | b284a3168fa91a038925d2ecf5e4791011ea5e7d (diff) |
gentoo resync : 15.12.2019
Diffstat (limited to 'net-vpn/tor/files')
-rw-r--r-- | net-vpn/tor/files/tor-0.2.7.4-torrc.sample.patch | 2 | ||||
-rw-r--r-- | net-vpn/tor/files/tor.initd-r9 | 37 | ||||
-rw-r--r-- | net-vpn/tor/files/torrc-r2 | 7 |
3 files changed, 45 insertions, 1 deletions
diff --git a/net-vpn/tor/files/tor-0.2.7.4-torrc.sample.patch b/net-vpn/tor/files/tor-0.2.7.4-torrc.sample.patch index 92eb03bb18ea..5f9e258de031 100644 --- a/net-vpn/tor/files/tor-0.2.7.4-torrc.sample.patch +++ b/net-vpn/tor/files/tor-0.2.7.4-torrc.sample.patch @@ -8,7 +8,7 @@ diff -Nuar tor-0.2.7.4-rc.orig/src/config/torrc.sample.in tor-0.2.7.4-rc/src/con +## Default username and group the server will run as +User tor + -+PIDFile /var/run/tor/tor.pid ++PIDFile /run/tor/tor.pid + ## Tor opens a SOCKS proxy on port 9050 by default -- even if you don't ## configure one below. Set "SOCKSPort 0" if you plan to run Tor only diff --git a/net-vpn/tor/files/tor.initd-r9 b/net-vpn/tor/files/tor.initd-r9 new file mode 100644 index 000000000000..c1639c2af95a --- /dev/null +++ b/net-vpn/tor/files/tor.initd-r9 @@ -0,0 +1,37 @@ +#!/sbin/openrc-run +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +command=/usr/bin/tor +pidfile=/run/tor/tor.pid +command_args="--hush --runasdaemon 1 --pidfile \"${pidfile}\"" +retry=${GRACEFUL_TIMEOUT:-60} +stopsig=INT +command_progress=yes + +extra_commands="checkconfig" +extra_started_commands="reload" +description="Anonymizing overlay network for TCP" +description_checkconfig="Check for valid config file" +description_reload="Reload the configuration" + +checkconfig() { + ${command} --verify-config --hush > /dev/null 2>&1 + if [ $? -ne 0 ] ; then + eerror "Tor configuration (/etc/tor/torrc) is not valid." + eerror "Example is in /etc/tor/torrc.sample" + return 1 + fi +} + +start_pre() { + checkconfig || return 1 + checkpath -d -m 0755 -o tor:tor /run/tor +} + +reload() { + checkconfig || return 1 + ebegin "Reloading Tor configuration" + start-stop-daemon -s HUP --pidfile ${pidfile} + eend $? +} diff --git a/net-vpn/tor/files/torrc-r2 b/net-vpn/tor/files/torrc-r2 new file mode 100644 index 000000000000..b308104c7031 --- /dev/null +++ b/net-vpn/tor/files/torrc-r2 @@ -0,0 +1,7 @@ +# +# Minimal torrc so tor will work out of the box +# +User tor +PIDFile /run/tor/tor.pid +Log notice syslog +DataDirectory /var/lib/tor/data |