#!/bin/zsh # PGBASE=$1 PGBIN=$PGBASE/bin PGDATA=$PGBASE/data ulimit -c unlimited echo "Starting postgres" sudo -u postgres $PGBIN/pg_ctl -D $PGDATA stop sudo killall postgres sudo rm -f $PGBASE/pgsql.log sudo touch $PGBASE/pgsql.log sudo chown postgres $PGBASE/pgsql.log sudo chmod 644 $PGBASE/pgsql.log sudo -u postgres /bin/sh -c "ulimit -c unlimited && $PGBIN/pg_ctl -D $PGDATA -l $PGBASE/pgsql.log start" sleep 8 #sudo -u postgres /bin/sh -c "/usr/sbin/pgbouncer -d /u/drkp/txcache-deploy-db/pgbouncer/pgbouncer.ini" echo "Done starting postgres" exit 0