Created
June 3, 2013 19:35
-
-
Save LucasArruda/5700706 to your computer and use it in GitHub Desktop.
OS X custom Apache launch daemon (/Library/LaunchDaemons/).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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
SO cross-reference: http://superuser.com/questions/601274/how-can-i-start-an-custom-installed-apache-at-boot-in-osx