service php restart

launchctl unload ~/Library/LaunchAgents/homebrew-php.josegonzalez.php55.plist

launchctl load ~/Library/LaunchAgents/homebrew-php.josegonzalez.php55.plist



/System/Library/LaunchDaemons

/System/Library/LaunchAgent

/Library/LaunchDaemons

/Library/LaunchAgents

~/Library/LaunchAgents

Those in you home directory generally don’t need sudo, while the others do.

restart

reload

link

Usage:

service selfupdate update from the Gist service php searches for a plist containing 'php' service php load|unload|reload insert or remove a plist from launchctl service php start|stop|restart manage a daemon, but leave it in launchctl (does not work with Agents) service php link If you use Homebrew, which you should, it will link the plist of this Formula into ~/Library/LaunchAgents, reloading if needed. Very useful when upgrading.

Manage all optional services at once

If you have several services running, especially if you are a developer, I also recommend to use a script to start/stop all of them at once when you are not working. They may not be using much resources, but having them running keeps the laptop working and can drain you battery very quickly.

Having dealt with services mostly on Linux, I grew accustomed to type. On Mac, this is more like:Which is ugly, hard to remember and launchctl has no way of listing all available services. Plus, those plist can reside in all those directories:This is why I can up with an utility to manage services. It searches in all directories above for your service, prompts for sudo if it is in a system directory and provide goodies likeand