I'm running Mac 10.6 (Snow Leopard). I would like to have a shell script that handles some routing/vpn and server tasks executed on Machine startup.
This script should be preferably executed before the user logs in but as long as it is backgrounded there are no issues with timing.
Where is the best place to call this from?
Thanks all
You should launchd handle that by creating a plist specifying the needed arguments etc. a short intro, Startup Scripts etc. got replaced by launchd back in Tiger.
From launchd, which is the standard way of doing this since 10.4. Maybe have a look at this editor (or this discontinued one) to help you creating the configuration files.
I've done the same for my users :
I've found infos here Offical Appple Doc Startup Scripts. Complete guide !
a quick hack would be to call it from the crontab with the @reboot extension (check man 5 crontab for details).
In my opinion for quick tasks, it's much less hassle than writing plists
use launchd. this is preferred (and official) way for 10.5 and 10.6
GUI for launchd: http://www.macupdate.com/info.php/id/19879/lingon