[tor-relays] How to include files into torrc?

nusenu nusenu at openmailbox.org
Sun Sep 11 08:56:00 UTC 2016


> If you're trying to apply the same policies across a number of relays
> on the same box, --defaults-torrc FILE can be used to provide default
> settings, and then each torrc can contain only the unique settings.
> 
> But on some OSs / distributions (like Debian), the defaults torrc
> file is in /usr/share/tor, not /etc/tor.
> 
> So if you want to modify it permanently, you'll need to protect that
> file from your package manager (using something like dpkg-divert), or
> change the --defaults-torrc path in your service manager (and if
> you're on Debian, that file is in /lib/systemd/system, and so you'll
> need to do dpkg-divert on it).


Instead of modifying the shipped unit file + dpkg-* you can also replace
specific unit file settings using the so called drop-in files:

systemd.unit man page (debian stable):
> Along with a unit file foo.service, a directory foo.service.d/ may 
> exist. All files with the suffix ".conf" from this directory will be 
> parsed after the file itself is parsed. This is useful to alter or
> add configuration settings to a unit, without having to modify their
> unit files. Make sure that the file that is included has the
> appropriate section headers before any directive.




https://www.freedesktop.org/software/systemd/man/systemd.unit.html
https://wiki.archlinux.org/index.php/Systemd#Drop-in_files

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.torproject.org/pipermail/tor-relays/attachments/20160911/c00aa47f/attachment.sig>


More information about the tor-relays mailing list