botc-mc-scripts/startup.sh
Nick Guy a334ba6823 Refactor script paths to use dynamic root directory
Replaced hardcoded paths with dynamic root directory selection based on the environment. Removed unused variable and simplified the `load-script.sh` invocation. These changes improve maintainability and adaptability for different environments.
2025-06-02 22:13:10 +01:00

14 lines
No EOL
516 B
Bash
Executable file

#!/bin/bash
# TODO Check venv, create if it doesn't exist
: "${ACTIVE_SCRIPT:=}"
TOOL_SCRIPT_DIR="/home/container/.scripts"
"${TOOL_SCRIPT_DIR}/load-script.sh" "${ACTIVE_SCRIPT}"
echo "Memory: ${SERVER_MEMORY}"
# Taken directly from the CurseForge Generic egg. No touchy.
java $([[ -f user_jvm_args.txt ]] && printf %s "@user_jvm_args.txt") -Xms128M -Xmx${SERVER_MEMORY}M -Dterminal.jline=false -Dterminal.ansi=true $([[ ! -f unix_args.txt ]] && printf %s "-jar `cat .serverjar`" || printf %s "@unix_args.txt")