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" 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? Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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/