#!/bin/bash
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.log stop
EOF