Skip to content

Instantly share code, notes, and snippets.

@dev4dev dev4dev/Postgres
Created Apr 17, 2011

What would you like to do?
start/stop postgres
if !File.exist?('/usr/local/var/postgres/') && ARGV[0] == 'start'
p %x[pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start]
p 'PG Started'
if File.exist?('/usr/local/var/postgres/') && ARGV[0] == 'stop'
%x[pg_ctl -D /usr/local/var/postgres stop -s -m fast]
p 'PG Stopped'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.