0

I am playing with CouchDB and whenever I do, I first have to issue

sudo couchdb -i -u couchdb couchdb -b

This starts CouchDB as the user couchdb, group couchdb. I then also have to enter my password again (I am admin but still need to, when doing a sudo) and all is fine.

How do I run CouchDB or anything similar at startup? Anytime anyone logs in, without any user interaction in OS X?

raoulsson
  • 4,763
  • 10
  • 34
  • 29

2 Answers2

4

You want to check out writing a launchd plist for CouchDB.

Specifically, it has fields for UserName and GroupName which provide the functionality you're after.

Jeremy L
  • 1,040
  • 7
  • 9
0

Login scripts run with root permissions when anyone logs in. It would remove the need to use sudo.

http://support.apple.com/kb/HT2420

  • Use launchd instead. It's hairy, but it works better for managing the startup of system wide programs like DB's or servers – tegbains Jan 18 '10 at 03:45