Restarting CouchDB on OS X from Homebrew

CouchDB

Every now and then I find that CouchDB on my laptop really needs to be restarted. Because it was installed with Homebrew, it's for an entry in my ~/Library/LaunchAgents/ directory - so it's best to do it nicely. Meaning don't just kill it. The simplest way to do this is just:

  $ cd ~/Library/LaunchAgents
  $ ls
  org.apache.couchdb.plist
  $ launchctl unload -w org.apache.couchdb.plist
  $ launchctl load -w org.apache.couchdb.plist

The unload stops it, and the load starts it again. Very neat and clean.