Tutorials/Ubuntu startup script

This is a simple startup-script for the upstart mechanism used by ubuntu-servers. It won't give you a console, which i don't consider a problem since there's an ingame console anyway. It also doesn't update minecraft, i believe there's a built-in updater coming on the way.

Prerequisites
sudo adduser --disabled-password minecraft sudo chown -R minecraft /srv/minecraft-server sudo vi /etc/init/minecraft-server.conf and pasting the following into it. Don't forget to change the directory after "chdir" to your installation description "start and stop the minecraft-server"
 * add a user for minecraft so that it doesn't run as root
 * hand your server-installation over to our new user, i have mine in /srv/minecraft-server
 * install the upstart script by opening /etc/init/minecraft-server.conf (NOT /etc/init.d but /etc/init (without the .d)

chdir # mine is /srv/minecraft-server

exec su -s /bin/sh -c 'exec "$0" "$@"' minecraft -- /usr/bin/java -Xms1536M -Xmx1536M -jar minecraft_server.jar nogui

start on starting networking stop on stopping networking

Usage
sudo start minecraft-server sudo stop minecraft-server
 * to start the server
 * to stop the server

Troubles?
Just contact me: User:Cel1ne