From 84ef4db188b1988227feba832e5779587de42a48 Mon Sep 17 00:00:00 2001 From: cjd24 Date: Tue, 6 Feb 2018 21:20:00 +0000 Subject: Filled in some of the first method stubs, added serverconfig.ts, and added script to install postgres on lab machine for doing db stuff --- runmepostgres.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 runmepostgres.sh (limited to 'runmepostgres.sh') diff --git a/runmepostgres.sh b/runmepostgres.sh new file mode 100755 index 0000000..fb68e5e --- /dev/null +++ b/runmepostgres.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +echo "> Starting Server"; +~/pg/postgres/bin/pg_ctl -D ~/pg/postgres/data/ -l POSTGRES_logfile start; + +echo "> Conecting as admin user: " + ${USER}; +~/pg/postgres/bin/psql -U ${USER} postgres; -- cgit v1.2.1 From d66a0d90a658d5094ba274c4b4c4c3d66d8254a3 Mon Sep 17 00:00:00 2001 From: cjd24 Date: Wed, 7 Feb 2018 03:09:50 +0000 Subject: Streamlined script for adding postgres, and added packages in preparation for writing ORM --- runmepostgres.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'runmepostgres.sh') diff --git a/runmepostgres.sh b/runmepostgres.sh index fb68e5e..632ea66 100755 --- a/runmepostgres.sh +++ b/runmepostgres.sh @@ -1,7 +1,8 @@ #!/bin/bash +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; -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; -- cgit v1.2.1 From 1bd45e04ea49d198a85a78eeac7ab6ce67db1ccf Mon Sep 17 00:00:00 2001 From: Tom Harley Date: Wed, 7 Feb 2018 18:08:13 +0000 Subject: started working on ORM for DB --- runmepostgres.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'runmepostgres.sh') 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; -- cgit v1.2.1 From 39dedb16ea84c55bce090295138105c2881aaf5c Mon Sep 17 00:00:00 2001 From: Tom Harley Date: Thu, 8 Feb 2018 01:20:26 +0000 Subject: fixed runmepostgres.sh to actually use PGDIR --- runmepostgres.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runmepostgres.sh') diff --git a/runmepostgres.sh b/runmepostgres.sh index b5dd29c..dfa5764 100755 --- a/runmepostgres.sh +++ b/runmepostgres.sh @@ -7,4 +7,4 @@ 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; +"$PGDIR/postgres/bin/psql" -U ${USER} postgres; -- cgit v1.2.1