Starting postmaster on startup in Mac OS X 10.2.4 via shell script - Mailing list pgsql-general

From Barry C. Hawkins
Subject Starting postmaster on startup in Mac OS X 10.2.4 via shell script
Date
Msg-id 1048264566.3e7b3f76d94bf@www.allthingscomputed.com
Whole thread Raw
Responses Re: Starting postmaster on startup in Mac OS X 10.2.4 via  (Adam Witney <awitney@sghms.ac.uk>)
Re: Starting postmaster on startup in Mac OS X 10.2.4 via shell script  (Jeff Fitzmyers <jeff@cloverpub.com>)
List pgsql-general
Colleagues,
    I recently installed PostgreSQL 7.3.2 from source on Mac OS X 10.2.4, and I
am wanting to have the server start automatically when the OS starts up.
However, I am having trouble with the shell script to start postmaster.
    I can manually su into the user account under which postmaster runs
(named 'pgsql', surprisingly I am sure) and execute the following command line
successfully:

#: /usr/local/pgsql/bin/pg_ctl start -D /usr/local/pgsql/data -l logfile -i -o

    The shell script equivalent which I am trying to use is as follows:

su -c '/usr/local/pgsql/bin/pg_ctl start -D /usr/local/pgsql/data -l logfile -
i -o' pgsql

    Upon login, I open a terminal and run 'pg_ctl status' and it confirms that
postmaster is not running.  I have also tried the following permutations for
the shell script command line:

su - pgsql -c '/usr/local/pgsql/bin/pg_ctl start -D /usr/local/pgsql/data -l
logfile -i -o'

su -l pgsql -c '/usr/local/pgsql/bin/pg_ctl start -D /usr/local/pgsql/data -l
logfile -i -o'

su -m pgsql -c '/usr/local/pgsql/bin/pg_ctl start -D /usr/local/pgsql/data -l
logfile -i -o'

    I am quite new to PostgreSQL, but its feature set seems unparalleled in
open source database platforms, so I really want to get this thing running.
Since I am prompted for the password when I run 'su -l pgsql' manually, I can't
help but think that I am failing to acquire the appropriate context under which
postmaster must run.  My logfile also seems to indicate that.  I am sure this
is some neophyte error on my part, but if one of the sages would be so kind as
to direct me, I would be most grateful.

Regards,
--
Barry C. Hawkins
Systems Consultant
All Things Computed
barry.hawkins@allthingscomputed.com
404-795-9147 voice/fax






pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Posts get losts
Next
From: Adam Witney
Date:
Subject: Re: Starting postmaster on startup in Mac OS X 10.2.4 via