[FEATURE REQUEST] ability to specify pidfile

Want something added? Ask for it here.
Post Reply
feld
Newbie
Newbie
Posts: 4
Joined: September 11th, 2010, 9:59 am

[FEATURE REQUEST] ability to specify pidfile

Post by feld »

Currently it is not possible to specify a pidfile. You can specify a directory with --pid, but the pidfile's name is dynamic, based on the listening port in the format of sabnzbd-port.pid ex, sabnzbd-8080.pid

This is extremely inconvenient for OS init scripts / rc scripts. I've recently revamped the FreeBSD rc script and had to attempt to piece together the pid file with this mess:

pidfile=/var/run/sabnzbd/sabnzbd-$(grep -m1 ^port ${sabnzbd_conf_dir}/sabnzbd.ini | tr -dc '[0-9]').pid

I would really appreciate a more reliable solution, namely the ability to specify the actual pidfile when starting the daemon.


Thanks
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: [FEATURE REQUEST] ability to specify pidfile

Post by shypike »

I'll have a look at it, but keep in mind that a very very small audience will have this issue.
User avatar
jcfp
Release Testers
Release Testers
Posts: 1032
Joined: February 7th, 2008, 12:45 pm

Re: [FEATURE REQUEST] ability to specify pidfile

Post by jcfp »

+1 for the request, despite the admittedly small audience of fools actually writing init scripts ;D

On my favorite os, I'm working around the current pid naming scheme by looking up the correct process 'manually' and feeding the result into a (fixed name) pidfile. I would definitely prefer to specify that pidfile directly on the command line. Anybody who wants to tell pid files apart by ports (or whatever other info) can still easily script that.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: [FEATURE REQUEST] ability to specify pidfile

Post by shypike »

I was already looking at an extra parameter (--pidfile).
I prefer not to break compatibility by changing the meaning of the current --pid parameter.
User avatar
jcfp
Release Testers
Release Testers
Posts: 1032
Joined: February 7th, 2008, 12:45 pm

Re: [FEATURE REQUEST] ability to specify pidfile

Post by jcfp »

Just tested what's currently on github, works fine as far as I can tell. Thanks Image
Post Reply