aboutsummaryrefslogtreecommitdiff
path: root/runmepostgres.sh
blob: b5dd29c38b3cc087b2b714247087527c311aecde (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#!/bin/bash

PGDIR=${1-"$HOME/pg"}

read -p "Press [Enter] key to start Postgres (will already be running if you just got it) use ctl+c to cancel";
echo "> Starting Server";
"$PGDIR/postgres/bin/pg_ctl" -D "$PGDIR/postgres/data/" -l POSTGRES_logfile start;

echo "> Conecting as admin user: " + ${USER};
~/pg/postgres/bin/psql -U ${USER} postgres;