Commit f2999d81 authored by Alvaro Hernandez's avatar Alvaro Hernandez
Browse files

[202012-postgres_on_aws_cloudshell] Install script: make source .bashrc idempotent

Signed-off-by: Alvaro Hernandez's avatarÁlvaro Hernández <>
parent 69b64890
......@@ -34,7 +34,8 @@ cat << EOF >> .bashrc
# PostgreSQL on CloudShell
export PATH=\$PATH:${PG_BIN_DIR}
${PG_BIN_DIR}/pg_ctl -D pgdata start
# Ensure we can source .bashrc in an essentially idempotent manner
( ${PG_BIN_DIR}/pg_ctl -D pgdata status > /dev/null ) || ${PG_BIN_DIR}/pg_ctl -D pgdata start
......@@ -54,6 +55,3 @@ ${PG_BIN_DIR}/pg_ctl -D pgdata start
# Create initial database user, so we can use Postgres simply executing "psql"
${PG_BIN_DIR}/createdb "${USER}"
# Export PATH for this current session too:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment