I run a minecraft server from a debian terminal, and this is probably the wrong way to do it, but it works. First, `sudo apt-get install screen`, then save the following script as `/etc/init.d/minecraft`:
#!/bin/bash
case "$1" in
start)
screen -S minecraft /home/mc/server/craftbukkit.sh
echo "Server started on screen minecraft"
;;
stop)
screen -X -S minecraft kill
echo "Server shutting down"
;;
*)
echo "Usage: /etc/init.d/minecraft {start|stop}"
exit 1
;;
esac
exit 0
Now, run the following commands as root:
`update-rc.d -f minecraft defaults`
This will make the minecraft server run in the background when the system boots. To view the console, run `screen -x minecraft` in a terminal. To quit the console, press Ctrl+A and then D.