From: "J. Roeleveld" <joost@antarean.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] How to have init-scripts 'wait' for other servers
Date: Fri, 4 Sep 2009 11:51:44 +0200 [thread overview]
Message-ID: <200909041151.44493.joost@antarean.org> (raw)
In-Reply-To: <20090904092309.GA12383@princeton.edu>
On Friday 04 September 2009 11:23:09 Willie Wong wrote:
> On Fri, Sep 04, 2009 at 10:51:14AM +0200, Penguin Lover J. Roeleveld
squawked:
> > Does anyone know if an existing method to have init-scripts on server A
> > wait for a service on server B to be started?
>
> I have no idea if this would work or not. But have you tried writing a
> init script that does nothing but polls for the service and only
> exits when succeeds? Then you can edit the scripts for the dependent
> services to require it to start after your polling script.
I have been thinking of something similar, but before starting to write this
myself, I wanted to double check if anyone has a better idea and/or already
knows of a set of scripts/tools that already implement this.
> Something like: script /etc/init.d/foo polls tries for database
> connection. Inside it is a time-delayed loop that tries until it
> succeeds. Edit /etc/init.d/apache (assuming you are using it for your
> webserver) to 'need foo'
Or, obviously, fails if it doesn't come up within a certain (configurable)
time.
> Again, I am just throwing this out randomly. Let me know if it works
> at all ;p
If there is no existing set of scripts, I will share whatever I come up with.
> Best of luck,
Thanks,
Joost
next prev parent reply other threads:[~2009-09-04 4:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-04 8:51 [gentoo-user] How to have init-scripts 'wait' for other servers J. Roeleveld
2009-09-04 9:23 ` Willie Wong
2009-09-04 9:51 ` J. Roeleveld [this message]
2009-09-04 10:44 ` Carlos
2009-09-04 11:38 ` J. Roeleveld
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200909041151.44493.joost@antarean.org \
--to=joost@antarean.org \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox