cd `dirname $0`
currentDir=`pwd`

su - postgres <<EOF
export LD_LIBRARY_PATH=$currentDir/lib:$LD_LIBRARY_PATH
$currentDir/bin/psql -v ON_ERROR_STOP=1 --username postgres --no-password --no-psqlrc -f $currentDir/initdb.d/init.sql;
EOF
