Date: Mon, 2 Mar 2009 11:05:07 -0800 (PST) From: Doug Barton <dougb@FreeBSD.org> To: Oliver Lehmann <lehmann@ans-netz.de> Cc: ports@freebsd.org, stable@freebsd.org Subject: Re: restart a script in etc/rc.d Message-ID: <alpine.BSF.2.00.0903021100190.59723@qbhto.arg> In-Reply-To: <20090302163843.cc66c55e.lehmann@ans-netz.de> References: <20090302163843.cc66c55e.lehmann@ans-netz.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 2 Mar 2009, Oliver Lehmann wrote: > Hi, > > I've below etc/rc.d bacula-fd and I copied it to bacula-fd2 because I > need to run 2 file daemons. > I'Ve modified every variable for the 2nd start script to be independent > from the first one. > It works so far but when I issue etc/rc.d/bacula-fd restart it also stops > the process started by bacula-fd2 probably because > > + _find_processes /usr/local/sbin/bacula-fd . -ax > > gets executed or whatever. > > Is there a way in the rc.d scope to define to only look for the pid in > the pid file (why do we have them anyway when we search everytime) and > only kill the PID listed in the pid file? Well that is certainly how it is supposed to work, and that script defines pidfile which should prevent it from doing what you're suggesting. So let's check your work. :) To accomplish what you want you would have to change all of the following in your duplicate script: 1. filename (IOW, you need 2 scripts with different names) 2. PROVIDE 3. name= 4. rcvar= (If you redefine $name that should be enough) 5. pidfile= 6. The names of the variables in the default assignments Also, the assignment of pidfile should really come after the defaults are set. If you do all that and it still doesn't work, send a diff of your two rc.d scripts to the list. hope this helps, Doug -- This .signature sanitized for your protection
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.0903021100190.59723>