Running a sudo command line in the start of Mac OS X

Rodrigo picture Rodrigo · Jul 19, 2011 · Viewed 9.9k times · Source

I am using a Mac OS X - Snow Leopard. And to connect in our CVS we need to start the stunnel.

All time I have to go to "Terminal" and write

sudo /opt/local/bin/stunnel
=> than write the password

In have no idea, so my question is: How I automatic write this command every time that the Mac OS X start? Or in this case, start a program in super-user mode?

Any suggestion?

Answer

Foo Bah picture Foo Bah · Jul 19, 2011

You should create a startup item (/Library/StartupItems/stunnel/stunnel; see the mysql startup item for guidance on how to set it up) or add a line in /etc/rc.common