CentOS 7.1 systemd script

Get help, report and discuss bugs.
Post Reply
phin
Posts: 2
Joined: 09 May 2015, 01:45

CentOS 7.1 systemd script

Post by phin » 09 May 2015, 01:50

Hello.

I have installed nzbget via the binary install, as I could not find a proper RPM for centos7. I installed everything to /opt/nzbget, i created a user nzbget that has ownership of the directory and a uid of 905, these are part of a shared group called fileshare gid 901, which also owns the directory.

I symlinked nzbget to /usr/local/bin/ and nzbget.conf to /usr/local/etc/

I created a service and when I manually type in the command, it works, but when I attempt to start the service, I have no luck. Any ideas?

Code: Select all

[Unit]
Description=NZBGet
# This will load nzbget only after setting up the network
After=network.target
[Service]
User=nzbget
Group=fileshare
Type=forking
ExecStart=/usr/local/bin/nzbget -c /usr/local/etc/nzbget.conf -D
ExecStop=/usr/local/bin/nzbget -Q
ExecReload=/usr/local/bin/nzbget -O
KillMode=process
Restart=on-failure
[Install]
# Needed to run nzbget at boot
WantedBy=multi-user.target

Code: Select all

May  8 21:35:24 localhost systemd: Starting NZBGet...
May  8 21:35:24 localhost systemd: Started NZBGet.
May  8 21:35:24 localhost nzbget: Request sent
May  8 21:35:24 localhost nzbget: server returned: Stopping server
Thanks!

phin
Posts: 2
Joined: 09 May 2015, 01:45

Re: CentOS 7.1 systemd script

Post by phin » 09 May 2015, 03:43

Oddly, a reboot seems to have fixed this... O_o.

I will keep an eye on this and see if it has any further hiccups

picardtux
Posts: 71
Joined: 05 Sep 2012, 12:45
Contact:

Re: CentOS 7.1 systemd script

Post by picardtux » 10 May 2015, 07:05

it could have been a file permissions problem.
after changing a setting in the webui, this is then away in nzbget.conf

pic

Post Reply

Who is online

Users browsing this forum: No registered users and 51 guests