Search Postgresql Archives

Re: CentOS initd Script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 12 September 2012 16:41, Kenaniah Cerny <kenaniah@xxxxxxxxx> 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@xxxxxxxxx)


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux