#!/bin/bash

#./bin/pg_ctl -D ../../data/pg -l ../../logs/pg/pg.log -p 8432 -o "--listen_addresses=0.0.0.0" start;
cd `dirname $0`
currentDir=`pwd`

su - postgres <<EOF
export LD_LIBRARY_PATH=$currentDir/lib:$LD_LIBRARY_PATH
$currentDir/bin/pg_ctl -D $currentDir/../../data/pg -l $currentDir/../../logs/pg/pg.log -o "--listen_addresses=0.0.0.0" start;

EOF
