Files
autodeploy/cavemen/nixrunserver.sh
T
2026-03-11 16:53:57 +02:00

16 lines
464 B
Bash
Executable File

#!/usr/bin/env nix-shell
#! nix-shell -i bash --pure
#! nix-shell -p javaPackages.compiler.openjdk17
#! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/tarball/nixos-25.11
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
/home/h3lp/mineserver/packworld.sh
fi
read -rp "Press Enter to continue..."