I’ve been searching everywhere and cannot seem to find an answer to the simplest of questions. In the NzbDrone installation guide it notes that you can start the program (debian) with :
mono /opt/NzbDrone/NzbDrone.exe
I cannot seem to find out how to stop the process in a similar manor being very unfamiliar with mono. Can anyone help out?
but I have a feeling that there is an easier/better way.
basically I’d like to start nzbdrone and specify the user/group it runs as and make it run in the background… if possible - and of course be able to stop it as well.
I don’t know if it’s nzbdrone or the command above (or the fact that I’m running it on a pi), but it takes about 3 minutes to start up.
There is an extremely simple way… You can simply edit the crontab for the user you wish to have NZBDrone run under, as any commands executed in there will be run with that user’s permissions. You probably don’t even need separate bash scripts unless you need some extra functionality. The start command can be something as simple as ‘/path/to/mono /path/to/NzbDrone.exe’ and the stop command can be something as simple as ‘pkill NzbDrone.exe’ You can tweak what user:group it runs using the sudo command. stdout and stderr can be redirected as needed like you would do with any normal cron job.
It sounds like you don’t actually need a service wrapper since you’re not wanting to start it at boot time and the program executable does not really support anything other than execute/terminate. Don’t make things more complicated than they need to be. If the only difference a service wrapper will make is typing ‘/etc/init.d/nzbdrone stop’ versus ‘pkill NzbDrone.exe’, don’t bother with it.