Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

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.

share|improve this answer
add comment

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

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

share|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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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