crash() { sleep 5 echo "Exit Complete" exit 1 } setperms() { echo -e "|_______________________________________________________|" echo -e "|##--------------- Setting Permissions ---------------##|" echo -e "|#| Setting permissions to UID:${PUID} and GID:${PGID}" sudo usermod -u ${PUID} minecraft sudo groupmod -g ${PGID} minecraft sudo chown -R ${PUID}:${PGID} /data echo -e "|#|---------------------------------------------------|#|" sleep 2 echo -e "|#| DONE" echo -e "|##---------------------------------------------------##|" sleep 2 } setEula() { if [[ "${EULA:-false}" != "true" ]]; then echo "EULA not accepted. Set EULA=true to accept the Minecraft EULA (https://aka.ms/MinecraftEULA)" crash fi cat < eula.txt #By changing the setting below to TRUE you are indicating your agreement to our EULA (https://aka.ms/MinecraftEULA). eula=true EOF } newForge() { if [[ "$(printf '%s\n' "1.17.1" "$MC_VERSION" | sort -V | head -n1)" = "1.17.1" ]]; then NEW_FORGE=true else NEW_FORGE=false fi } serverInfoWrite() { cat < server.info MC_VERSION=$MC_VERSION MC_LOADER=$MC_LOADER MC_LOADER_VERSION=$MC_LOADER_VERSION JAVA_VERSION=${JAVA_VERSION:-"N/A"} JAR=${JAR:-"N/A"} XMS=${XMS:-"N/A"} XMX=${XMX:-"N/A"} ADD_ARGS=${ADD_ARGS:-"NONE"} PUID=$PUID PGID=$PGID EOF }