add multi-instance service unit file
Task Info (Flyspray) | |
---|---|
Opened By | nusenu (nusenu) |
Task ID | 50877 |
Type | Feature Request |
Project | Community Packages |
Category | Packages |
Version | None |
OS | All |
Opened | 2016-09-23 21:00:26 UTC |
Status | Assigned |
Assignee | Lukas Fleischer (lfleischer) |
Assignee | Levente Polyak (anthraxx) |
Assignee | kpcyrd (kpcyrd) |
Details
Description: Unlike other distributions (Fedora/CentOS, Debian/Ubuntu), Arch Linux does not ship a multi-instance service file with it's tor package, which would allow easy setups of multiple concurrent tor instances. Something that is required by many relay operators to make use of all CPU cores.
I'd like to add Arch Linux support to this ansible role, the only blocker is the missing multi-instance support in Arch Linux's tor package. https://github.com/nusenu/ansible-relayor
You could simply copy Fedora's service files, that can be found here: http://pkgs.fedoraproject.org/cgit/rpms/tor.git/tree/tor@.service http://pkgs.fedoraproject.org/cgit/rpms/tor.git/tree/tor-master.service
To integrate with logrotate (all instances should get a HUP signal) the logrotate file would need to restart the tor-master service, like: http://pkgs.fedoraproject.org/cgit/rpms/tor.git/tree/tor.logrotate
The exiting service file (/usr/lib/systemd/system/tor.service) would mainly remain unchanged with a minor addition of: PartOf=tor-master.service ReloadPropagatedFrom=tor-master.service like: http://pkgs.fedoraproject.org/cgit/rpms/tor.git/tree/tor.service
More background on systemd multi-instance support: http://0pointer.de/blog/projects/instances.html
What do you think?