Move ram config to minecraft.env

This commit is contained in:
h3lp
2026-03-11 16:53:57 +02:00
parent 946366309c
commit da4d4b495a
3 changed files with 7 additions and 1 deletions
+3 -1
View File
@@ -3,7 +3,9 @@
#! nix-shell -p javaPackages.compiler.openjdk17
#! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/tarball/nixos-25.11
java -Xmx8192M -Xms6144M -jar minecraft_server.jar nogui
source /home/h3lp/mineserver/minecraft.env
java -Xmx${MEMORY_MAX}M -Xms${MEMORY_MIN}M -jar minecraft_server.jar nogui
read -rp "Pack and publish world? [y/N] " answer
if [[ "$answer" =~ ^[Yy]$ ]]; then
+2
View File
@@ -1,2 +1,4 @@
SERVERPACK=https://20111511.xyz/serverpack.tar.xz
WORLD=https://20111511.xyz/world.tar.xz
MEMORY_MAX=8192
MEMORY_MIN=6144
+2
View File
@@ -195,6 +195,8 @@
# 5) Copy cavemen/* files over, overwriting existing
cp -rf "$TMPDIR/autodeploy/cavemen/." "$MINESERVER/"
chmod +x "$MINESERVER/nixrunserver.sh"
# Also copy minecraft.env for future reference
cp "$TMPDIR/autodeploy/minecraft.env" "$MINESERVER/minecraft.env"
# Cleanup and mark setup as done
rm -rf "$TMPDIR"