Date: Fri, 20 May 2011 09:39:27 -0700 From: Doug Barton <dougb@FreeBSD.org> To: utisoft@gmail.com Cc: freebsd-rc@freebsd.org Subject: Re: get_pidfile_from_conf usage Message-ID: <4DD6993F.3080709@FreeBSD.org> In-Reply-To: <BANLkTin22u9QvvoxCGf44vw_pr0ZMeo8PQ@mail.gmail.com> References: <BANLkTin22u9QvvoxCGf44vw_pr0ZMeo8PQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 05/19/2011 12:15, Chris Rees wrote: > Hi all, > > I know it's been done to death recently, and there're examples in > slim, but I'd just like some clarity here -- I'm sticking it into musicpd.in. slim is a particularly odd/complex case due to the way that it is tied deeply to X. named and devd are simpler examples. > Is it absolutely necessary to define a precmd and postcmd to get the > pidfile, or can I just set prestart_cmd=find_pidfile&& > prestop_cmd=find_pidfile? It needs to be run in both start and stop _precmd because both need to know the pid file location. You need to test for the function's existence in ports because it won't be there for all systems we support for years yet. However, the feature has been MFC'ed so it will be in all of the next releases. You could use the find_pidfile method from slim, and if I understand what you're asking above, and you have no other start/stop _precmd you could do the following: start_precmd=find_pidfile stop_precmd=find_pidfile > How do I get status working properly; it doesn't look right in slim... Works fine for me: # service named status named is running as pid 1532. # service slim status slim is running as pid 1791. hth, Doug -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4DD6993F.3080709>