Date: Wed, 19 Oct 2005 10:36:55 -0500 From: Dan Nelson <dnelson@allantgroup.com> To: Marco Molteni <molter@tin.it> Cc: hackers@freebsd.org Subject: Re: rc scripts: how to start a process that doesn't daemonize itself? Message-ID: <20051019153655.GB4225@dan.emsphone.com> In-Reply-To: <200510191715.21582.molter@tin.it> References: <200510191715.21582.molter@tin.it>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Oct 19), Marco Molteni said: > I have a program that I would like to control via a rc script, > say /usr/local/etc/rc.d/myprog > > problem is this program needs to be put explicitly in background. > > I was playing with things like > > command="/usr/sbin/daemon /usr/local/bin/myprog" > > but this obviously works only for the start case. > > Should I just override start() completely or is there a > common way to do it? I don't think I can simply pass a "&" somewhere... Try putting the "&" in command_args; that way it'll only be used during startup. I do that in some of my homegrown rc.d scripts. A (probably cleaner) way is to set start_cmd="/usr/sbin/daemon /usr/local/bin/myprog" -- Dan Nelson dnelson@allantgroup.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051019153655.GB4225>