Skip to content

Instantly share code, notes, and snippets.

@bsnyder
Last active October 24, 2017 04:32
$ printf '%s\n\n%s' '#!/bin/bash' 'su postgres -c "/opt/local/lib/postgresql94/bin/pg_ctl -D /opt/local/var/db/postgresql94/defaultdb -l /opt/local/var/db/postgresql94/defaultdb/postgresql.log start"' > ~/bin/pg_start.sh
$ chmod +x ~/bin/pg_start.sh
$ printf '%s\n\n%s' '#!/bin/bash' 'sudo su postgres -c "/opt/local/lib/postgresql94/bin/pg_ctl -D /opt/local/var/db/postgresql94/defaultdb stop"' > ~/bin/pg_stop.sh
$ chmod +x ~/bin/pg_stop.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment