-
-
Save anonymous/03baf8c0bab3ebb62fd0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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