From 7c6e663ee366f11f63ec16ac0c2d6663017cb5fa Mon Sep 17 00:00:00 2001 From: Hippolyte Chauvin Date: Fri, 28 Apr 2023 08:11:39 +0200 Subject: [PATCH] Ajout du script de lancement d'un serveur Minecraft --- bin/minecraft_server-start.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 bin/minecraft_server-start.sh diff --git a/bin/minecraft_server-start.sh b/bin/minecraft_server-start.sh new file mode 100755 index 0000000..f8919bb --- /dev/null +++ b/bin/minecraft_server-start.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +# cd to the server dir +cd "$(dirname "$(readlink -f "$0")")" || exit + +# Variables +min_ram=1G +max_ram=4G +server_jar= + +# Execution +exec screen java \ + "-Xms${min_ram}" \ + "-Xmx${max_ram}" \ + -jar "$server_jar" \ + nogui +