FS#40059 - [nzbget] Systemd Service File

Attached to Project: Community Packages
Opened by Brandon Golway (brando56894) - Thursday, 24 April 2014, 04:01 GMT
Last edited by Jaroslav Lichtblau (Dragonlord) - Sunday, 08 March 2015, 14:18 GMT
Task Type Feature Request
Category Packages
Status Closed
Assigned To Jaroslav Lichtblau (Dragonlord)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Any chance this systemd service can get added to the package?

[Unit]
Description=NZBGet
# This will make sure, that nzbget is loaded AFTER setting up the network
DaemonAfter=network.target

[Service]
# Even if you set up the Daemon User in nzbget.conf, you will still
# need to set that name here. Otherwise, nzbget will be run as root
User=nzbget
ExecStart=/usr/bin/nzbget -D
ExecStop=/usr/bin/nzbget -Q
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process

[Install]
# Needed to run nzbget at boot
WantedBy=multi-user.target



Source: http://lostsalad.co.za/2012/12/13/raspberry-pi-usenet-downloads-with-nzbget
This task depends upon

Closed by  Jaroslav Lichtblau (Dragonlord)
Sunday, 08 March 2015, 14:18 GMT
Reason for closing:  Won't implement
Comment by Jan Holthuis (Holzhaus) - Monday, 03 November 2014, 16:11 GMT
In the meantime, I uploaded a package named "nzbget-systemd" to the AUR.

With this package you can easily start NZBGet via "sudo systemctl start nzbget". It will run as User "nzbget" (Home: "/var/lib/nzbget").

@Jaroslav: Any chance to merge this into the community package?
Comment by David J. Haines (dhaines) - Wednesday, 07 January 2015, 05:33 GMT
Perhaps it'd be better to make an nzbget@.service with a User=%i inside?
Comment by David J. Haines (dhaines) - Wednesday, 07 January 2015, 06:32 GMT
This seems to work well for me:

[Unit]
Description=NZBGet Daemon

[Service]
User=%i
ExecStart=/usr/bin/nzbget -D
ExecReload=/usr/bin/nzbget -O
ExecStop=/usr/bin/nzbget -Q
PIDFile=%h/nzbget.lock
KillMode=process

[Install]
WantedBy=multi-user.target
Comment by Jaroslav Lichtblau (Dragonlord) - Sunday, 08 March 2015, 14:18 GMT
The AUR package seems to cover the need for the systemd file nicely. For now, I'll not add it to the community version and suggest to go upstream with this request. New versions for nzbget seems to be released relatively often, so if they decide to accept systemd, it should not take that long to have it in.

Loading...