Skip to content

Instantly share code, notes, and snippets.

@budhash
Forked from mystix/org.eclipse.jetty.plist
Created October 23, 2012 05:20
Show Gist options
  • Save budhash/3936835 to your computer and use it in GitHub Desktop.
Save budhash/3936835 to your computer and use it in GitHub Desktop.
Jetty 6 & 7 launchd plists for OSX
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"><!-- NOTE: place this file in /Library/LaunchDaemons -->
<dict>
<key>Disabled</key>
<false/>
<key>Label</key>
<string>org.eclipse.jetty</string>
<key>ServiceDescription</key>
<string>Jetty 7</string>
<key>RunAtLoad</key>
<true/>
<key>EnvironmentVariables</key>
<dict>
<key>JAVA_HOME</key>
<string>/Library/Java/Home</string>
</dict>
<key>WorkingDirectory</key><!-- required! -->
<string>/path/to/jetty</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/java</string>
<string>-Djava.io.tmpdir=/path/to/tmp</string><!-- note: run "jetty check" and use the java.io.tmpdir setting -->
<string>-Djetty.port=8181</string>
<string>-Djetty.home=/path/to/jetty</string>
<string>-Djetty.logs=/path/to/jetty/logs</string>
<string>-jar</string>
<string>start.jar</string>
<string>--pre=etc/jetty-logging.xml</string><!-- for jetty
</array>
<key>UserName</key><!-- note: this key is ignored when plist is not loaded as ROOT user -->
<string>root</string><!-- jetty must be launched by root user in order to access privileged ports -->
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"><!-- NOTE: place this file in /Library/LaunchDaemons -->
<dict>
<key>Disabled</key>
<false/>
<key>Label</key>
<string>org.eclipse.jetty</string>
<key>ServiceDescription</key>
<string>Jetty 6</string>
<key>RunAtLoad</key>
<true/>
<key>EnvironmentVariables</key>
<dict>
<key>JAVA_HOME</key>
<string>/Library/Java/Home</string>
</dict>
<key>WorkingDirectory</key><!-- required! -->
<string>/path/to/jetty</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/java</string>
<string>-Djava.io.tmpdir=/path/to/tmp</string><!-- note: run "jetty check" and use the java.io.tmpdir setting -->
<string>-Djetty.port=8181</string>
<string>-Djetty.home=/path/to/jetty</string>
<string>-Djetty.logs=/path/to/jetty/logs</string>
<string>-jar</string>
<string>start.jar</string>
<string>/path/to/jetty/etc/jetty-logging.xml</string>
<string>/path/to/jetty/etc/jetty.xml</string>
</array>
<key>UserName</key><!-- note: this key is ignored when plist is not loaded as ROOT user -->
<string>root</string><!-- jetty must be launched by root user in order to access privileged ports -->
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment