I’ve recently setup Sonarr and I’m wanting to verify that it is running under another user and not root, as implied from the ps aux output. I did follow the instructions for creating another user and defining that account in the /etc/init.d/nzbdrone script.
Is what I’m seeing in ps aux as it should be? Is mono spinning up as root and then it is calling the NzbDrone.exe as the specified user?
I’m just wanting to understand how that works and if I’ve done it properly.
mono will show as running under the user it was started as, looks like either the init script isn’t starting Sonarr or isn’t setting the user correctly.
Here is what I’ve got. The script appears to be working as I can use service commands to stop, start and restart nzbdrone and it does appear to be working upon system bootup.
Quick update, calling --user on top of -c didn’t make a difference, but thank you for providing that link. It does explain how your script is functioning.
I wonder if other Debian users have run into this if this script’s adoption rate is rather low.
This is a bummer… but I’m determined to figure it out, rather than moving back to SickRage too quickly.
Once again, thank you for the guidance. Per the other comments, did I manage to miss the information for how Sonarr would suggest adding this to a debian system’s startup or do we only have the script manufactured by another entity? I’m educating myself on the sysinitv vs systemd changes that happened in Debian 8.
There are lots of ways to do it on all the various OSes that Sonarr can run on so we’ve had users that run Sonarr on those systems provide scripts that they have used to get Sonarr running at startup. With so many different systems it’s impossible for us to give a recommendation on them all or generate our own startup scripts, though incorrect scripts are fixed/removed when possible (usually by other users).
Oddly enough, and contradictory to what I thought I had seen without the init.d script installed, NzbDrone.exe is autostarting, but I have confirmed removal of the init.d script. This leads me to believe something else is autostarting nzbdrone before the script ever started, which could be why I’m seeing it started as root rather than the user defined in the init.d script from the wiki.
Hmmm… nzbdrone doesn’t autostart just from installing it, correct? I had believed this to be the case.
The only other spot that could be lauching it would be /etc/rc.local and sure enough when I recalled this bit of information, I realized that I had used this for testing at some point and completely forgot about it like the Debian noob that I am.
Once I removed this, I used the script from the wiki and voila, we see the following.
Amazing how things work correctly when you set them up correctly.
This is all part of the learning experience though.
Once again, thank you for taking the time to help out. I’ll be making a donation to your project and I hope your team is able to continue crafting this fine piece of software.