'/etc/init.d' or 'service' equivalent on Mac OS X

Is there any /etc/init.d or service equivalent on Mac OS X Lion? I want to start/stop daemons, such as apache.

1

1 Answer

man launchd

DESCRIPTION launchd manages processes, both for the system as a whole and for individual users. The pri- mary and preferred interface to launchd is via the launchctl(1) tool which (among other options) allows the user or administrator to load and unload jobs. Where possible, it is preferable for jobs to launch on demand based on criteria specified in their respective con- figuration files.

During boot launchd is invoked by the kernel to run as the first process on the system and to further bootstrap the rest of the system.

You cannot invoke launchd directly.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like