Skip to content

Instantly share code, notes, and snippets.

@rodrigomaia
Created March 10, 2012 15:46
Show Gist options
  • Save rodrigomaia/2011838 to your computer and use it in GitHub Desktop.
Save rodrigomaia/2011838 to your computer and use it in GitHub Desktop.
Start|Stop Postgres on Mac
#!/bin/bash
echo -n "PostgreSQL 9.1 "
action=$1
if [ -z $1 ]
then
action='start'
fi
echo "${action}ing"
sudo -u postgres /Library/PostgreSQL/9.1/bin/pg_ctl -D /Library/PostgreSQL/9.1/data ${action}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment