Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
for reference; was the only start up editor that worked for me on 10.6. Thanks for all the suggestions. – Antitribu Feb 18 '10 at 11:23
up vote 2 down vote accepted

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.

share|improve this answer

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.

share|improve this answer

I've done the same for my users :

I've found infos here Offical Appple Doc Startup Scripts. Complete guide !

share|improve this answer
This method is deprecated since 10.4 where it has been replaced by launchd. – Sven Feb 16 '10 at 11:40

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

share|improve this answer
normally I'm a huge fan of that (as much as I shouldn't be) but I was curious on how to do it properly. – Antitribu Feb 16 '10 at 13:21

use launchd. this is preferred (and official) way for 10.5 and 10.6

GUI for launchd:

share|improve this answer

Your Answer


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.