Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 75381 - net-misc/tor
Summary: net-misc/tor
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High minor (vote)
Assignee: Peter Johanson (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-22 16:12 UTC by Faustus
Modified: 2005-02-11 04:29 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
tor-0.0.9.4-r1.ebuild (tor-0.0.9.4-r1.ebuild,1.12 KB, text/plain)
2005-02-10 12:39 UTC, Gustavo Felisberto (RETIRED)
Details
tor.initd (tor.initd,663 bytes, text/plain)
2005-02-10 12:41 UTC, Gustavo Felisberto (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Faustus 2004-12-22 16:12:37 UTC
Tor package lacks an init.d script, and sensible configuration as a client.

Here's what I did, hopefully it's translatable to ebuild :)

Create user/group tor:tor, home directory /var/lib/tor
Create dirs /var/lib/tor and /var/log/tor (750) owned by tor:tor

In /etc/init.d/tor:
(the HOME thing is because tor tries to stat ~/.tor)
-------------------
depend() {
        need net
}

start() {
        ebegin "Starting Tor"
        HOME=/var/lib/tor
        start-stop-daemon --start --quiet --chuid tor --exec /usr/bin/tor -- --runasdaemon 1
        eend $?
}

stop() {
        ebegin "Stopping Tor"
        start-stop-daemon --stop --quiet --chuid tor --exec /usr/bin/tor
        eend $?
}

In /etc/tor/torrc:
------------------
User tor
Group tor

HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 80 127.0.0.1:80
HiddenServiceNodes moria1,moria2

DataDirectory   /var/lib/tor/data
Log notice file /var/log/tor/tor.log

In /etc/privoxy/config:
(this can probably be just printed after merge)
-----------------------
forward-socks4a *.onion localhost:9050 .
Comment 1 Gustavo Felisberto (RETIRED) gentoo-dev 2005-02-10 12:39:52 UTC
Created attachment 50948 [details]
tor-0.0.9.4-r1.ebuild
Comment 2 Gustavo Felisberto (RETIRED) gentoo-dev 2005-02-10 12:41:30 UTC
Created attachment 50949 [details]
tor.initd

Place this file in files before emerging previous ebuild.
I did not test that it will run ok, i just used the ideas and hacked it
together.
Comment 3 Gustavo Felisberto (RETIRED) gentoo-dev 2005-02-10 12:52:41 UTC
Forgot #!/sbin/runscript at beginning of initd :)
Comment 4 Gustavo Felisberto (RETIRED) gentoo-dev 2005-02-10 18:25:18 UTC
I added this version to portage a few hours ago. Hope all is ok. Please test and report.
Comment 5 Faustus 2005-02-11 04:29:10 UTC
Works fine, thanks!

I think you can close this bug.