Skip to content

Instantly share code, notes, and snippets.

@martinstannard
Created June 4, 2009 03:29
Show Gist options
  • Save martinstannard/123408 to your computer and use it in GitHub Desktop.
Save martinstannard/123408 to your computer and use it in GitHub Desktop.
# launch control script for nginx on osx
# place in /System/Library/LaunchDaemons/nginx.plist
# then run "launchctl load -F /System/Library/LaunchDaemons/nginx.plist"
<?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>nginx</string>
<key>Program</key>
<string>/opt/nginx/sbin/nginx</string>
<key>KeepAlive</key>
<true/>
<key>NetworkState</key>
<true/>
<key>StandardErrorPath</key>
<string>/var/log/system.log</string>
<key>LaunchOnlyOnce</key>
<true/>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment