#! /bin/sh pgpath="$HOME/bin/pgsql_924b" echo $PATH | grep $pgpath | wc -l if [ `echo $PATH | grep $pgpath | wc -l` == 0 ]; then PATH=$pgpath/bin:$PATH fi PGDATA0="$HOME/data/pgdata_0" PGDATA1="$HOME/data/pgdata_1" PGARC0="$HOME/data/pgarc_0" PGARC1="$HOME/data/pgarc_1" PGPORT0=5432 PGPORT1=5433 unset PGPORT unset PGDATA echo "Postgresql is \"`which postgres`\"" killall -9 postgres rm -rf $PGDATA0/* $PGARC0/* initdb -D $PGDATA0 cat >> $PGDATA0/postgresql.conf <> $PGDATA0/pg_hba.conf <> $PGDATA1/recovery.conf <> $PGDATA0/recovery.conf <