Talk:Tutorials/Ubuntu startup script

.conf file for Ubuntu 11.04
Thanks for the guide. I used it to get minecraft-server running automagically on Ubuntu 11.04

However I could only do so using a slightly different .conf file as it wouldn't start on restart but the following worked out of the box. service start minecraft-server

Heres the .conf I am now using. Note that the only difference is the start on job, network-manager. (although I am supplying Java different memory args as well)

description "start and stop the minecraft-server"

chdir /srv/minecraft-server

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

start on starting network-manager stop on stopping network-manager

I've never played with UpStart before, but I know now what a stanza, event etc. is so cheers :D

However this also means I could be doing the wrong thing. It seems to work though.

EnsignR 16:11, 17 June 2012 (UTC)