Starting postmaster on startup in Mac OS X 10.2.4 via shell script

Поиск
Список
Период
Сортировка
От Barry C. Hawkins
Тема Starting postmaster on startup in Mac OS X 10.2.4 via shell script
Дата
Msg-id 1048264566.3e7b3f76d94bf@www.allthingscomputed.com
обсуждение исходный текст
Ответы Re: Starting postmaster on startup in Mac OS X 10.2.4 via
Re: Starting postmaster on startup in Mac OS X 10.2.4 via shell script
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Posts get losts
Следующее
От: Adam Witney
Дата:
Сообщение: Re: Starting postmaster on startup in Mac OS X 10.2.4 via