rc script REQUIRE-ing a service on another host

Tandon, Sahil (IM) Sahil.Tandon at morganstanley.com
Wed May 21 13:34:13 UTC 2008


Jonathan McKeown:

> We had a power failure last night, and this morning I found 
> that imapproxyd (running on a webserver which provides 
> webmail) had failed to start because it depends on imapd 
> (running on the mailserver, a different host), and imapproxyd 
> had won the startup race.
> 
> I need to prevent the race by making one service depend on 
> another service running remotely. While I sketch out some 
> horribly untidy fix, can the Lazyweb tell me if there is 
> already a neat solution for this?

I do not know if this is possible within the rc script itself.
Have you looked into sysutils/monit (to monitor and restart a 
service like imapproxyd)?  Nagios is probably overkill for this.  
Monit can be configured to check whether imapproxyd is running 
and restart it if necessary.

Just make sure you do not make the monit rc script depend on
anything running remotely. :-)

--
Sahil Tandon
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.


More information about the freebsd-questions mailing list