Created
October 25, 2014 15:03
-
-
Save lordastley/d2f3a328a8722b6373b4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Since this is Upstart 0.6.5, | |
# setuid, setgid, console directives do not work. | |
# I'm using daemonize to compensate. | |
# see http://software.clapper.org/daemonize/daemonize.html | |
# daemonize forks once, so 'expect fork' is needed | |
description "An Upstart 0.6.5 script for running a headless minecraft server" | |
start on filesystem or runlevel [2345] | |
stop on runlevel [!2345] | |
chdir /srv/minecraft | |
respawn | |
# optional respawn limit | |
#respawn limit 20 5 | |
expect fork | |
exec daemonize -c /srv/minecraft -u [user-goes-here] /usr/bin/java -server -d64 -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:ParallelGCThreads=4 -XX:+UseAdaptiveGCBoundary -XX:-UseGCOverheadLimit -XX:SurvivorRatio=16 -Xnoclassgc -XX:UseSSE=3 -Xmx1024M -Xms1024M -jar minecraft_server.jar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment