Php - Run php-fpm manually and register to service with launchctl on Mac



myphp-start.sh :

echo "Starting php-fpm.."

launchctl load -w /usr/local/opt/myphp/homebrew.mxcl.myphp.plist

clear

echo "Now, php-fpm is active.."

launchctl list | grep "php"

exit 0


myphp-stop.sh :

echo "Stoping php-fpm.."

launchctl unload -w /usr/local/opt/myphp/homebrew.mxcl.myphp.plist

clear

echo "Now, php-fpm is inactive.. If php-fpm actived, it would appear bellow."

launchctl list | grep "php"

exit 0


to check php-fpm was runing or not

$ launchctl list | grep "php" (enter)

service homebrew.mxcl.myphp will disapear from list of service on your mac.


Source :

https://stackoverflow.com/questions/17837374/stopping-php-fpm-homebrew-installation-mac-osx-10-8-2

Comments