I’ve followed a few guides to install NZBGet, CouchPotato and Sonarr on OSMC RC but I’ve had no luck. NZBGet partially works but if I reboot the Pi, OSMC stalls on the loading screen. I was wondering if anyone had successfully installed any of these on OSMC RC? Thanks.
Note: I’ve followed the guides with success on Raspbian in the past.
Don’t install Upstart! OSMC is base on systemd. Create the following file to start nzb at system start:
sudo nano /etc/systemd/system/nzbget.service
paste this
[Unit]
Description=NZBGet
# This will load nzbget only after setting up the network
After=network.target
[Service]
User=osmc
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
and save the file. Test it:
sudo systemctl start nzbget.service
Works for me. I don’t have Couchpotato and Sonarr but it should work the same way.
I successfully installed couch potato and I can run the deamon and it works remotely. I tried your script but it doesn’t autostart after reboot. Any advice?
NZBGet is working but it keeps pausing downloads with the following error;
Pausing all activities due to errors in configuration
There are the following errors just prior to the above one;
.nzbget(61): Invalid value for option “NzbDir” (/media/2TB/Usenet/NZBGet/nzb/): could not read information for directory /media/2TB/Usenet/NZBGet/nzb: errno 13,
.nzbget(67): Invalid value for option “QueueDir” (/media/2TB/Usenet/NZBGet/queue/): could not read information for directory /media/2TB/Usenet/NZBGet/queue: errno 13,
.nzbget(70): Invalid value for option “TempDir” (/media/2TB/Usenet/NZBGet/tmp/): could not read information for directory /media/2TB/Usenet/NZBGet/tmp: errno 13,
.nzbget(49): Invalid value for option “InterDir” (/media/2TB/Usenet/NZBGet/inter/): could not read information for directory /media/2TB/Usenet/NZBGet/inter: errno 13,
All those folders exist. Any ideas on how to fix this greatly appreciated.
DaemonAfter is not a valid unit directive as far as I know. You should either have
After = network.target
or
After = network-online.target
network.target will cause it to start after our network manager (connman) starts, but potentially before the network is actually up (doesn’t usually matter for daemons that bind to all interfaces though) and will also cause it to be shut down before the network goes down on reboot/shutdown.
network-online.target will cause it to wait until the network is actually up and running (valid IP address received by DHCP and link active) but it will only wait if you enable the connman-wait-for-network service as well. (Which will also make Kodi wait for the network to be up before loading)
With connman-wait-for-network disabled, (the default) network-online.target will behave the same as network.target.
Had the same problems with a network (cifs) share. Seems to be permission related . Now I download to my sd card and run a cron job which rsyncs to my network share.
Still can’t seem to get NZBGet to start without pausing due to configuration errors. Could it be that NZBGet is starting before my USB HD is mounted? If I manually resume NZBGet it works fine.
I managed by added nzbget to start at boot by adding
nzbget -D
to the rc.local file. Don’t know how pretty it is, but it works
sudo nano /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
nzbget -D
exit 0
I need help to setting up nzbget in the latest OSMC.
I followed the config example in this thread, but when I execute sudo systemctl start nzbget.service nothing happens.
I have installed nzbget into my home, running the nzbget install script. The binary generated by this is working, when I navigate to its folder and run ./nzbget but somehow, it isnt being called correctly by the script.
[Unit]
Description=NZBGet
# This will load nzbget only after setting up the network
After=network-online.target
[Service]
User=osmc
ExecStart=/home/osmc/nzbget/nzbget -D
ExecStop=/home/osmc/nzbget/nzbget -Q
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
[Install]
# Needed to run nzbget at boot
WantedBy=multi-user.target
Any input on this will be appreciated.
I want to learn how to properly run things on systemd
I used the guides listed in the first post here.
But only as a rough guide up to where they create unit.d scripts for autostart. Stop there.
You have to make system.d scripts as shown in this thread.
Also in the guides if you come across where it says chown pi change that to osmc.
[Unit]
Description=NZBGet
After=network.target
[Service]
User=osmc
Group=osmc
ExecStart=/opt/nzbget/nzbget -D
ExecStop=/opt/nzbget/nzbget -Q
# process will demonize and parent return ok
Type=forking
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
[Install]
# Needed to run nzbget at boot
WantedBy=multi-user.target