restart a script in etc/rc.d
Doug Barton
dougb at FreeBSD.org
Mon Mar 2 11:05:20 PST 2009
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
More information about the freebsd-ports
mailing list