aboutsummaryrefslogtreecommitdiff
path: root/runmepostgres.sh
diff options
context:
space:
mode:
authorTom Harley2018-02-22 18:47:08 +0000
committerTom Harley2018-02-22 18:47:08 +0000
commit5dafe924bbbd5cc09901186ff74e4b68a6dcd52f (patch)
treeff4a76d6eaed5773d89d0da6a02d788ffe210abb /runmepostgres.sh
parentMerge branch 'master' into trh/payload-checker (diff)
downloadmedicine-5dafe924bbbd5cc09901186ff74e4b68a6dcd52f.tar.gz
medicine-5dafe924bbbd5cc09901186ff74e4b68a6dcd52f.zip

Revert “Revert”Merge branch ‘trh/error-middleware’ into ‘master’""

This reverts commit 3198c6c2474101623e3b95bd038effe210c176a8.

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..dfa5764 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};
+"$PGDIR/postgres/bin/psql" -U ${USER} postgres;