Skip to content

Instantly share code, notes, and snippets.

@typetetris
Last active November 6, 2020 10:38
Show Gist options
  • Save typetetris/a7ae777b4c904230695e69be53717bb3 to your computer and use it in GitHub Desktop.
Save typetetris/a7ae777b4c904230695e69be53717bb3 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
mkdir -p sandbox
if pg_ctl -D sandbox/db status | grep 'is running' > /dev/null
then
echo "already running"
else
pg_ctl -w -D sandbox/db -l sandbox/dblogfile start
fi
# psql -h localhost -p 5431 -U dev dev # to connect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment