This is the mail archive of the
mailing list for the Cygwin project.
cygserver 1.20: How to start this daemon before PostgreSQL's postmaster in a script?
- From: "J.-S.Co ELEKTROPRIVOD" <e-complex at mtu-net dot ru>
- To: cygwin at cygwin dot com
- Date: Fri, 24 Mar 2006 17:09:28 +0300
- Subject: cygserver 1.20: How to start this daemon before PostgreSQL's postmaster in a script?
The problem is that I want to write a script "pg_start" that would do
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
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?
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html