check new version
This commit is contained in:
17
roles/03-installation-minecraft/templates/start.sh.j2
Normal file
17
roles/03-installation-minecraft/templates/start.sh.j2
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
# {{ ansible_managed }}
|
||||
|
||||
# Configuration
|
||||
SERVER_DIR="{{ minecraft_server_dir }}"
|
||||
JAR_FILE="{{ spigot_jar_name }}"
|
||||
MIN_RAM="{{ minecraft_memory_min }}M"
|
||||
MAX_RAM="{{ minecraft_memory_max }}M"
|
||||
|
||||
# JVM Flags optimisés pour Minecraft
|
||||
JVM_FLAGS="{{ jvm_flags }}"
|
||||
|
||||
# Aller dans le répertoire du serveur
|
||||
cd "$SERVER_DIR" || exit 1
|
||||
|
||||
# Démarrer le serveur
|
||||
exec java -Xms${MIN_RAM} -Xmx${MAX_RAM} ${JVM_FLAGS} -jar ${JAR_FILE} --nogui
|
Reference in New Issue
Block a user