Re: CentOS initd Script

Поиск
Список
Период
Сортировка
От Ondrej Ivanič
Тема Re: CentOS initd Script
Дата
Msg-id CAM6mieKHSWHDhUAkA6x9-CsCX_UCx5bUy5zHgASHSsPnmu01fA@mail.gmail.com
обсуждение исходный текст
Ответ на CentOS initd Script  (Kenaniah Cerny <kenaniah@gmail.com>)
Список pgsql-general
Hi,

On 12 September 2012 16:41, Kenaniah Cerny <kenaniah@gmail.com> wrote:
> In the service script that gets installed to /etc/rc.d/init.d/, there is a
> hard-coded value for PGPORT. Would it be possible to have this variable and
> the corresponding -p flag set when calling postgres removed?

My init.d script has the following:
# Set defaults for configuration variables
PGENGINE=/usr/bin
PGPORT=5432
PGDATA=/var/lib/pgsql/data
PGLOG=/var/lib/pgsql/pgstartup.log

# Override defaults from /etc/sysconfig/pgsql if file is present
[ -f /etc/sysconfig/pgsql/${NAME} ] && . /etc/sysconfig/pgsql/${NAME}

In this case you can create as many configs as you need, for example:
/etc/sysconfig/pgsql/postgresql:
PGDATA=/var/lib/pgsql/data
PGPORT=5432
PGLOG=/var/lib/pgsql/pgstartup.log
PGOPTS='--config_file=/etc/postgresql.conf'

/etc/sysconfig/pgsql/postgresql2:
PGDATA=/var/lib/pgsql2/data
PGPORT=54320
PGLOG=/var/lib/pgsql2/pgstartup.log
PGOPTS='--config_file=/etc/postgresql.conf'

and create /etc/init.d/postgresql2 as symlink to /etc/init.d/postgresql

--
Ondrej Ivanic
(ondrej.ivanic@gmail.com)


В списке pgsql-general по дате отправления:

Предыдущее
От: François Beausoleil
Дата:
Сообщение: Re: Amazon High I/O instances
Следующее
От: John R Pierce
Дата:
Сообщение: Re: Amazon High I/O instances