PDA

View Full Version : How to... sudo tuncfg and hamachi start at login?




GirthP
Mar 1, 2008, 04:15 PM
Ok, I hope this is the right forum to place this query.

I want to set up an automatic script to run hamachi at login.

I just need a little direction, and don't mind doing most of the legwork.

Do I write a bash script to start tuncfg (which is required first), then to start hamachi?

Do I link it somehow to launchd?

These are my guesses at this point... if I'm getting close, that would be great to know, or if I'm way off, that would be great to know.

Thanks very much for any help you can offer!



numero
Mar 2, 2008, 11:53 AM
Haven't tried this, but here is how it seems it should work.

Make a launchd .plist file. Put it in /Library/LaunchDaemons. The .plist should target a shell script that does the work you need. No need for sudo in the shell script as launchd will run the script as root. No special place required for the shell script. It can be anywhere you like.

--numero

GirthP
Mar 2, 2008, 12:38 PM
thanks!

krymzon40
Jul 9, 2008, 12:05 AM
Haven't tried this, but here is how it seems it should work.

Make a launchd .plist file. Put it in /Library/LaunchDaemons. The .plist should target a shell script that does the work you need. No need for sudo in the shell script as launchd will run the script as root. No special place required for the shell script. It can be anywhere you like.

--numero

Hey, can you help me out? I have no idea how to to what you said there. Could you guide me through the process?

janey
Jul 9, 2008, 06:04 AM
Hey, can you help me out? I have no idea how to to what you said there. Could you guide me through the process?

A quick search would have solved your problem ;)
http://forums.macrumors.com/showthread.php?t=458736

The first post seems to outline exactly what you need done.

krymzon40
Jul 10, 2008, 12:24 AM
A quick search would have solved your problem ;)
http://forums.macrumors.com/showthread.php?t=458736

The first post seems to outline exactly what you need done.

Yea thanks, i saw that but it all looked alien to me, i just posted there asking how it's all done.