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?

link|improve this question

67% accept rate
feedback

2 Answers

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.

link|improve this answer
feedback

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

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

link|improve this answer
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 3:45
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.