delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <4423FD98.9010708@mtu-net.ru> |
Date: | Fri, 24 Mar 2006 17:09:28 +0300 |
From: | "J.-S.Co ELEKTROPRIVOD" <e-complex AT mtu-net DOT ru> |
User-Agent: | Thunderbird 1.5 (Windows/20051201) |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | cygserver 1.20: How to start this daemon before PostgreSQL's postmaster in a script? |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Hello! The problem is that I want to write a script "pg_start" that would do the following: 1) start cygserver daemon (cygserver -e -Y >>logfile 2>&1) 2) make sure that the initialization of the daemon is fully completed!!! 3) start the postmaster (pg_ctl -l ... start) I really don't know how to program step 2 above. I wrote the following code: while :; do if [ `ps | grep -c 'CYGSERVER'` -eq 1 ]; then break fi done but it did not work :( I think that it was because the line containing 'CYGSERVER' appeared in the `ps` output BEFORE the daemon finished its initialization. Am I right? Can anybody suggest a proper solution? Thank you. ---- Alexey Lyubimov -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |