monit-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: depend take 2


From: Jan-Henrik Haukeland
Subject: Re: depend take 2
Date: 20 Dec 2002 20:56:14 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Civil Service)

Rory Toma <address@hidden> writes:

> There is still one more bug. With the following monitrc, there are 2
> problems that I see so far.
> 
> 1) running "monit stop sshd" only stops xinetd and sshd, gpm does not
> get stopped.

This is due to the order on how entries are written in the monitrc
file as I mentioned before (I'm fixing it). If you use this order it
should work:

 check gpm with pidfile /var/run/gpm.pid
 start program = "/etc/rc.d/init.d/gpm start"
 stop  program = "/etc/rc.d/init.d/gpm stop"
 depends on xinetd
 
 check xinetd with pidfile /var/run/xinetd.pid
 start program = "/etc/rc.d/init.d/xinetd start"
 stop  program = "/etc/rc.d/init.d/xinetd stop"
 depends on sshd
 
 check sshd with pidfile /var/run/sshd.pid
 start program = "/etc/rc.d/init.d/sshd start"
 stop  program = "/etc/rc.d/init.d/sshd stop"


> 2) If I kill sshd, the validation looks like:
> 
> [PST Dec 20 11:28:45] stop: (xinetd) /etc/rc.d/init.d/xinetd
> [PST Dec 20 11:28:46] stop: (gpm) /etc/rc.d/init.d/gpm
> [PST Dec 20 11:28:47] start: (sshd) /etc/rc.d/init.d/sshd
> [PST Dec 20 11:28:48] start: (xinetd) /etc/rc.d/init.d/xinetd
> [PST Dec 20 11:28:49] start: (gpm) /etc/rc.d/init.d/gpm
> 
> which has the order of gpm and xinetd flipped. I'll take a look at this
> a little later this afternoon if I don't hear back.

The start order is correct! gpm depends on xinetd so xinetd is started
first and xinetd depends on sshd. The stop order is fixed if the list
is ordered as above.

-- 
Jan-Henrik Haukeland



reply via email to

[Prev in Thread] Current Thread [Next in Thread]