OS X custom Apache launch daemon (/Library/LaunchDaemons/).
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.company.launchd.apache2</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/apache2/bin/apachectl</string> | |
<string>start</string> | |
</array> | |
<key>RunAtLoad</key> | |
<true/> | |
</dict> | |
</plist> |
#!/bin/sh | |
# unloading current apache (system) | |
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist | |
sudo chown root:wheel /Library/LaunchDaemons/com.company.launchd.apache2.plist | |
# loading our custom apache | |
sudo launchctl load -w /Library/LaunchDaemons/com.company.launchd.apache2.plist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
SO cross-reference: http://superuser.com/questions/601274/how-can-i-start-an-custom-installed-apache-at-boot-in-osx