Created
February 1, 2015 01:13
-
-
Save Luminus/469c91823fbf38c06686 to your computer and use it in GitHub Desktop.
I installed postgresql on my mac using MacPorts and created these scripts so I can easily start and stop the server without going nuts. I put these scripts in my personal /bin at ~/bin/ and run chmod +x on them
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo 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' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo su postgres -c '/opt/local/lib/postgresql94/bin/pg_ctl -D /opt/local/var/db/postgresql94/defaultdb stop' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment