Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 547068 - net-vpn/tor: allow more than one tor instance
Summary: net-vpn/tor: allow more than one tor instance
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: John Helmert III
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-19 10:16 UTC by Toralf Förster
Modified: 2023-08-05 01:13 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2015-04-19 10:16:09 UTC
by moving

CONFFILE=/etc/tor/torrc

from the init.d script into the conf.d file it would by easier to setup a 2nd tor instance at the same system.

And

PIDFILE=/var/run/tor/tor.pid

within the init.d script would need an adaption too (by coding `basename $0` into the file name ?)
Comment 1 Anthony Basile gentoo-dev 2015-04-19 10:41:32 UTC
(In reply to Toralf Förster from comment #0)
> by moving
> 
> CONFFILE=/etc/tor/torrc
> 
> from the init.d script into the conf.d file it would by easier to setup a
> 2nd tor instance at the same system.
> 
> And
> 
> PIDFILE=/var/run/tor/tor.pid
> 
> within the init.d script would need an adaption too (by coding `basename $0`
> into the file name ?)

Great idea!  I look forward to the patch ;)

Teasing aside, if you can write a patch I'll apply it, else I'll hack something up.  Take a look at stunnel which allows you to create several /etc/init.d scripts, all named things like stunnel.home stunnel.office.  The pid file is then created as /run/stunnel/${SERVICENAME}.pid where SERVICENAME=stunnel.home etc.  You can do the same with the tor and not only allow multiple pids but also mutliple config files using the same technique.

Give it a go and I'll help if you get stuck, don't have time, etc.