Skip to content

Instantly share code, notes, and snippets.

Created August 27, 2012 23:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/03baf8c0bab3ebb62fd0 to your computer and use it in GitHub Desktop.
Save anonymous/03baf8c0bab3ebb62fd0 to your computer and use it in GitHub Desktop.
#! /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