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 .
Created attachment 50948 [details] tor-0.0.9.4-r1.ebuild
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.
Forgot #!/sbin/runscript at beginning of initd :)
I added this version to portage a few hours ago. Hope all is ok. Please test and report.
Works fine, thanks! I think you can close this bug.