Create a gist now

Instantly share code, notes, and snippets.

anonymous /gist:03baf8c0bab3ebb62fd0 Secret
Created Aug 27, 2012

What would you like to do?
#! /bin/sh
# /etc/init.d/minecraft
### BEGIN INIT INFO
# Provides: minecraft
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Inicia o Servidor de Minecraft no boot.
# Description: Liga o servidor de Minecraft durante o boot.
### END INIT INFO
# Inicia o Servidor
cd /home/minecraft/; java -Xmx1024M -Xms1024M -jar server.jar minecraft_server.jar
# Carry out specific functions when asked to by the system
case "$1" in
start)
echo "Iniciando o servidor de Minecraft..."
echo "Iniciado."
;;
stop)
echo "Desligando..."
echo "Desligado."
;;
*)
echo "Uso: /etc/init.d/minecraft {start|stop}"
exit 1
;;
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment