Skip to content

Instantly share code, notes, and snippets.

@Centzilius
Created February 14, 2014 14:16
Show Gist options
  • Save Centzilius/9001701 to your computer and use it in GitHub Desktop.
Save Centzilius/9001701 to your computer and use it in GitHub Desktop.
Modified craftbukkit.sh
[Unit]
Description=Minecraft server implementing the Bukkit API
[Service]
User=craftbukkit
Group=craftbukkit
ExecStart=/usr/bin/tmux new-session -d -s craftbukkit-console -d 'cd /srv/craftbukkit; java -Xmx1024M -Xms1024M -jar /srv/craftbukkit/craftbukkit.jar nogui'
ExecStop=/usr/bin/tmux send-keys -t craftbukkit-console 'broadcast NOTICE: Server shutting down in 5 seconds!' C-m;
ExecStop=/usr/bin/sleep 5
ExecStop=/usr/bin/tmux send-keys -t craftbukkit-console 'stop' C-m;
Type=forking
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment