--
Ticket URL: <http://dev.deluge-torrent.org/ticket/2034>
Deluge <http://deluge-torrent.org/>
Deluge project
Comment(by mcx):
I also created a unit for deluged web interface daemon[1] and a .socket
unit[2] for socket activation of the web UI.
[1] deluged-web-ui.service
[2] deluged-web-ui.socket
--
Ticket URL: <http://dev.deluge-torrent.org/ticket/2034#comment:1>
Comment(by matimatik):
Need socket passing support (either tcpd-like, or native systemd
interface) in deluge-webui for this .socket to be usable. Maybe we need
start new ticket about it...
--
Ticket URL: <http://dev.deluge-torrent.org/ticket/2034#comment:2>
Comment(by matimatik):
Found
[http://twistedmatrix.com/documents/current/api/twisted.python.systemd.html
this] in Twisted documentation about integration with systemd.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/2034#comment:3>
* status: new => closed
* resolution: => fixed
Comment:
We don't really keep the service files in the codebase as they are either
on the wiki or included by package maintainers.
I have created a [wiki:UserGuide/InitScript/systemd systemd] wiki page
which probably needs fleshed out more.
I also think you should probably modify the script for `deluged` to also
wait on the filesystem like the ubuntu upstart scripts.
--
Ticket URL: <http://dev.deluge-torrent.org/ticket/2034#comment:4>
* status: closed => reopened
* resolution: fixed =>
Comment:
I am the Fedora maintainer of Deluge and would request the systemd unit
files be included in the codebase by default and conditionally installed
only on distributions using systemd. This is easily achieved by using
pkgconfig
http://www.freedesktop.org/software/systemd/man/daemon.html
Unlike sysv init scripts, systemd unit files are standardized across
distros and Fedora (in the near future RHEL), (open)SUSE, Mageia,
Mandriva, Arch Linux, NixOS etc use systemd by default and Debian
installer has recently added support as well. Besides adding this support
does not affect non-systemd distros in any way. Several upstream projects
include systemd by default including Transmission etc. Thanks for your
consideration.
--
Ticket URL: <http://dev.deluge-torrent.org/ticket/2034#comment:5>
Comment (by keretamalam):
I am about to leave and cannot look into this further right now, but I do
want to mention that relying on pkg-config itself is not a problem (as you
said, we also use it later), the problem is that on some systems, the .pc
file for pkg-config is supplying wrong information (whereas on yours, it's
botan-config that is wrong), so that's why I'm trying to make it work with
both (while one of them is bad).
[http://maskodoq.blogspot.com/2014/03/unit-link-terbaik-di-indonesia.html
Unit Link Terbaik di Indonesia Commonwealth Life Investra Link]
[http://maskodoq.blogspot.com/2013/07/CiptoJunaedy.html Cipto Junaedy]
[http://etnisjawa.blogspot.com/2013/08/apakah-cipto-junaedy-bohong.html
Cipto Junaedy]
--
Ticket URL: <http://dev.deluge-torrent.org/ticket/2034#comment:6>
* milestone: Future => 2.0.0
--
Ticket URL: <http://dev.deluge-torrent.org/ticket/2034#comment:6>
Comment (by hobarrera):
Personally, I'd much prefer that a user service file is provided (or maybe
simply both, since one does not affect the other):
{{{
[Unit]
Description=A bitorrent client daemon
Documentation=man:deluged(1)
[Service]
ExecStart=/usr/bin/deluged -d
[Install]
WantedBy=default.target
}}}
This file should be installed into /usr/lib/systemd/user/deluged.service.
The main difference is that this does not require root privileges to start
the daemon, and it runs as a user of the service starting it (rather than
a dedicated user).
I guess it may also allow multiple users to run their own instances of
deluged (not sure if they could run at the same time) though.
--
Ticket URL: <http://dev.deluge-torrent.org/ticket/2034#comment:7>
Deluge <http://deluge-torrent.org/>
Deluge Project
Comment (by Cas):
The reason for dedicated user is for security.
I have put service files into the codebase: http://git.deluge-
torrent.org/deluge/tree/packaging/systemd?h=develop
Though I will need to remember to include it in source tarball.
--
Ticket URL: <http://dev.deluge-torrent.org/ticket/2034#comment:8>
Comment (by hobarrera):
> The reason for dedicated user is for security.
I understand this, but that requires root privileges to manage (also,
downloads directory permissions becomes a bit of a pain with multiple
users).
A user systemd service runs as the user, and importantly, can be
controlled (started/stopped) by that user.
Any reason to NOT include both systemd files (they go into different
locations, so there's no conflict).
--
Ticket URL: <http://dev.deluge-torrent.org/ticket/2034#comment:9>
Comment (by Cas):
Are you suggesting this for desktop users rather than server environment,
which is what these service file we originally intended for.
I am trying to envisage the scenarios that you are trying to cater for and
whether there is a better alternative to cover all of them.
For example I have been looking at systemd as user:
https://www.brendanlong.com/systemd-user-services-are-amazing.html
--
Ticket URL: <http://dev.deluge-torrent.org/ticket/2034#comment:10>
Comment (by hobarrera):
Yup, the additional file I'm proposing is geared towards desktop users,
rather than dedicated machines.
I don't think a *single* alternative can cover both scenarios; they're
pretty different.
--
Ticket URL: <http://dev.deluge-torrent.org/ticket/2034#comment:11>
Comment (by Cas):
So looking at this again, I am thinking that removing the user and group
and instead put them in a conf file
`/etc/systemd/system/deluged.d/user.conf`. This would mean the service
files can be installed in both system and user locations.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/2034#comment:13>
Comment (by hobarrera):
That's not correct: non-root users can't edit the
/etc/systemd/system/deluged.d/user.conf file.
The systemd user unit file allows non-root users to manage and run deluge
as themselves, without requiring root access on the host.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/2034#comment:14>
Comment (by Cas):
Without the user details in service files they can be installed to both
system and user. There is no need for a non-root user to edit
`/etc/systemd/system/deluged.d/user.conf file`
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/2034#comment:15>
Comment (by hobarrera):
Without the user details, the system version would run as `root`, rather
than as a dedicated user. Running a torrent daemon as root sounds like an
awful idea, especially security-wise.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/2034#comment:16>
* milestone: 2.1.x => 2.0.2
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/2034#comment:18>
* status: reopened => closed
* resolution: => Fixed
Comment:
Now in tarball: 212efc4f52dd9979511b871a560356c3e7b7ad6b
@hobarrera As long as package maintainers correctly install the service
file with user.conf file and create deluge user there is no issue.
/etc/systemd/system/deluged.service
/etc/systemd/system/deluged.service.d/user.conf
The use of deluge user in service file does rely on the actual deluge user
being added to the system. I think it makes sense to remove it from the
default service file and include details in user and packaging guides that
using root is discouraged and detail how to setup with specific user.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/2034#comment:19>