Re: restart a script in etc/rc.d

2009-03-03 Thread Doug Barton
Oliver Lehmann wrote: Doug Barton wrote: Artis Caune wrote: There is logic error in bacula rc.d script. It should first set default variables and only then use them. pidfile=${bacula_fd_pidfile} : ${bacula_fd_pidfile=/var/run/bacula-fd.9102.pid} If you don't set pidfile in

Re: restart a script in etc/rc.d

2009-03-02 Thread Oliver Lehmann
Hi Doug, Doug Barton wrote: 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. PROVIDE is in both cases utility (probably a generic unchanged default) - I've

Re: restart a script in etc/rc.d

2009-03-02 Thread Doug Barton
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

Re: restart a script in etc/rc.d

2009-03-02 Thread Doug Barton
Oliver Lehmann wrote: Hi Doug, Doug Barton wrote: 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. PROVIDE is in both cases utility (probably a generic

Re: restart a script in etc/rc.d

2009-03-02 Thread Oliver Lehmann
Doug Barton writes: You missed the bit where I said that this should come after the assignment of the defaults below. Ok, but... Have you confirmed that the two pid files exist, and that they contain the right information? Yes they both exists (probably because I define the variable in

Re: restart a script in etc/rc.d

2009-03-02 Thread Doug Barton
Oliver Lehmann wrote: Doug Barton writes: You missed the bit where I said that this should come after the assignment of the defaults below. Ok, but... Have you confirmed that the two pid files exist, and that they contain the right information? Yes they both exists (probably because I

Re: restart a script in etc/rc.d

2009-03-02 Thread Glen Barber
On Mon, Mar 2, 2009 at 4:10 PM, Glen Barber glen.j.bar...@gmail.com wrote: On Mon, Mar 2, 2009 at 2:25 PM, Oliver Lehmann lehm...@ans-netz.de wrote: Hi Doug, Doug Barton wrote: Also, the assignment of pidfile should really come after the defaults are set. If you do all that and it still

Re: restart a script in etc/rc.d

2009-03-02 Thread Glen Barber
On Mon, Mar 2, 2009 at 2:25 PM, Oliver Lehmann lehm...@ans-netz.de wrote: Hi Doug, Doug Barton wrote: 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. PROVIDE is

Re: restart a script in etc/rc.d

2009-03-02 Thread Artis Caune
2009/3/2 Artis Caune artis.ca...@gmail.com: 2009/3/2 Oliver Lehmann lehm...@ans-netz.de: r...@nudel rc.d grep bacula_fd /etc/rc.conf bacula_fd_enable=YES bacula_fd2_enable=YES bacula_fd2_flags= -u root -g wheel -v -c /usr/local/etc/bacula-fd2.conf

Re: restart a script in etc/rc.d

2009-03-02 Thread Doug Barton
Artis Caune wrote: 2009/3/2 Artis Caune artis.ca...@gmail.com: 2009/3/2 Oliver Lehmann lehm...@ans-netz.de: r...@nudel rc.d grep bacula_fd /etc/rc.conf bacula_fd_enable=YES bacula_fd2_enable=YES bacula_fd2_flags= -u root -g wheel -v -c /usr/local/etc/bacula-fd2.conf

Re: restart a script in etc/rc.d

2009-03-02 Thread Artis Caune
2009/3/2 Oliver Lehmann lehm...@ans-netz.de: r...@nudel rc.d grep bacula_fd /etc/rc.conf bacula_fd_enable=YES bacula_fd2_enable=YES bacula_fd2_flags= -u root -g wheel -v -c /usr/local/etc/bacula-fd2.conf bacula_fd2_pidfile=/var/run/bacula-fd.9104.pid can you try with:

Re: restart a script in etc/rc.d

2009-03-02 Thread Oliver Lehmann
Doug Barton wrote: Artis Caune wrote: There is logic error in bacula rc.d script. It should first set default variables and only then use them. pidfile=${bacula_fd_pidfile} : ${bacula_fd_pidfile=/var/run/bacula-fd.9102.pid} If you don't set pidfile in rc.conf, pidfile is so