pgpool2.git / summary / log / commit / refs

commit    945041574f2fca580fbec0fdc72dcf6e415d3c8d
Author:   Tatsuo Ishii <ishii@postgresql.org>
Date:     Thu Nov 13 07:42:42 2014 +0000

    Allow to set configuration file directory by setting environment variable PGPOOLDIR.
    
    Avoid errors when pcp.conf.sample does not exist. This could happen in RPM installation.


src/test/pgpool_setup | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/test/pgpool_setup b/src/test/pgpool_setup index 7f83f16db..438fc0239 100755 --- a/src/test/pgpool_setup +++ b/src/test/pgpool_setup @@ -57,7 +57,7 @@ BASEPORT=11000 NUMCLUSTERS=2 # Where to look for pgpool.conf.sample* PGPOOL_INSTALL_DIR=${PGPOOL_INSTALL_DIR:-"/usr/local"} -PGPOOLDIR=$PGPOOL_INSTALL_DIR/etc +PGPOOLDIR=${PGPOOLDIR:-${PGPOOL_INSTALL_DIR}/etc} # PostgreSQL commands(initdb, pg_ctl, psql) install dir PGBIN=${PGBIN:-"/usr/local/pgsql/bin"} # LD_LIBRARY_PATH @@ -704,7 +704,10 @@ echo "logdir = '$BASEDIR/log'" >> $CONF echo '$PGPOOL_INSTALL_DIR/bin/pgpool -D -n -f $dir/etc/pgpool.conf -F $dir/etc/pcp.conf -a $dir/etc/pool_hba.conf > $dir/log/pgpool.log 2>&1 &' >> $STARTALL # create pcp.conf -cp $PGPOOLDIR/pcp.conf.sample etc/pcp.conf + +if [ -f $PGPOOLDIR/pcp.conf.sample ];then + cp $PGPOOLDIR/pcp.conf.sample etc/pcp.conf +fi echo -n "${WHOAMI}:" >> etc/pcp.conf $PGPOOL_INSTALL_DIR/bin/pg_md5 $WHOAMI >> etc/pcp.conf [parent: 94e630fb9703]