Skip to content

Instantly share code, notes, and snippets.

@jbott
Created June 19, 2015 21:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbott/c9eb6b4460eb5e2fc9fe to your computer and use it in GitHub Desktop.
Save jbott/c9eb6b4460eb5e2fc9fe to your computer and use it in GitHub Desktop.
Minecraft init script for tmux
#!/bin/sh
# Go to script directory
BINDIR=$(dirname "$(readlink -fn "$0")")
cd "$BINDIR"
### Configuration ###
XMS="1G"
XMX="1G"
JAR="minecraft_server.jar"
JAVA_BIN="../java/jdk1.8.0_45/bin"
### Start ###
tmux new -s vanilla "export PATH=$PATH:${JAVA_BIN} && java -Xms${XMS} -Xmx${XMX} -jar ${JAR} nogui"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment