need a shim between postgresql and pgpool startup
Randal L. Schwartz
merlyn at stonehenge.com
Wed Mar 7 21:49:45 UTC 2012
>>>>> "Matthew" == Matthew Seaman <matthew at FreeBSD.org> writes:
Matthew> For extra credit, write a small routine that attempts to log into
Matthew> postgres (or otherwise establish that postgres is up and doing) and
Matthew> loops until it succeeds or it has reached a certain maximum number of
Matthew> tries. Make this a function called start_precommand() and use the
Matthew> run_rc_command facility so it only runs if the script is given some form
Matthew> of start argument. Docco on rc script functionality is in rc.subr(8)
Matthew> Also look at:
Matthew> http://www.freebsd.org/doc/en/books/porters-handbook/rc-scripts.html
Yeah, I'd been staring at those for a few hours, even staring at the
source code of rc.subr to sort this out. Thanks for the drop-in
answer. I'll see if it does the job on the next reboot.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion
More information about the freebsd-rc
mailing list