aboutsummaryrefslogtreecommitdiff
path: root/runmepostgres.sh
diff options
context:
space:
mode:
authorTom Harley2018-02-07 18:08:13 +0000
committerTom Harley2018-02-07 18:08:13 +0000
commit1bd45e04ea49d198a85a78eeac7ab6ce67db1ccf (patch)
treead6c1e78f93d908428f06f8a28244374946b62f0 /runmepostgres.sh
parentAdding some basics to the report (Also checking I didnt break stuff with that... (diff)
downloadmedicine-1bd45e04ea49d198a85a78eeac7ab6ce67db1ccf.tar.gz
medicine-1bd45e04ea49d198a85a78eeac7ab6ce67db1ccf.zip

started working on ORM for DB

Diffstat (limited to 'runmepostgres.sh')
-rwxr-xr-xrunmepostgres.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/runmepostgres.sh b/runmepostgres.sh
index 632ea66..b5dd29c 100755
--- a/runmepostgres.sh
+++ b/runmepostgres.sh
@@ -1,8 +1,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";
-~/pg/postgres/bin/pg_ctl -D ~/pg/postgres/data/ -l POSTGRES_logfile start;
+"$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;
+echo "> Conecting as admin user: " + ${USER};
+~/pg/postgres/bin/psql -U ${USER} postgres;