Re: [ADMIN] pgsql.sh

From: Matthew Hixson <hixson(at)frozenwave(dot)com>
To: Jonah Kuo <jonahk(at)mail(dot)lbfe(dot)org(dot)tw>
Cc: pgsql-admin <pgsql-admin(at)postgreSQL(dot)org>
Subject: Re: [ADMIN] pgsql.sh
Date: 1998-11-24 06:11:14
Message-ID: Pine.LNX.3.96.981123220523.13718A-100000@www.frozenwave.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Mon, 23 Nov 1998, Jonah Kuo wrote:

> Hello,
>
> First of all, I apologize if this has been discussed before.
>
> I have this startup script 'pgsql.sh' on my FreeBSD-3.0 system,
> everything goes fine except I can't have error messages send to
> the file I specified in this script
>
> #!/bin/sh
> [ -x /tmp/.s.PGSQL.* ] && rm -f /tmp/.s.PGSQL.*
> [ -x /usr/local/pgsql/bin/postmaster ] && {
> su -l postgres -c 'exec
> /usr/local/pgsql/bin/postmaster
> -D/usr/local/pgsql/data
> -S -o -F > /usr/local/pgsql/errlog' &
> echo -n ' pgSQL'
> }
>
> There was an /usr/local/pgsql/errlog opened, and the error messages are
> always
> send to console regardless of specifying '-S' option or not.
>
> Is there anybody encountered this before? any help would be grateful.

On this line:

-S -o -F > /usr/local/pgsql/errlog' &

Modify it to look like this:

-S -o -F 2>&1 > /usr/local/pgsql/errlog' &

Assuming this script runs through bash it will direct standard error
(stderr) to standard output (stdout). All output will be sent to
/usr/local/pgsql/errlog.

Enjoy.
-M@

--
Matthew Hixson - CIO Linux, n;
FroZenWave Communications the nouveau postmodern operating
http://www.frozenwave.com system for the masses

In response to

  • pgsql.sh at 1998-11-23 08:24:35 from Jonah Kuo

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Jonah Kuo 1998-11-24 07:17:37 Re: [ADMIN] pgsql.sh
Previous Message Jonah Kuo 1998-11-24 05:40:59 Re: [ADMIN] pgsql.sh