Skip to content

Commit

Permalink
improve entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
0x7d8 committed Jul 20, 2024
1 parent d62ed94 commit 2bb56b3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions java/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ if [[ "$OVERRIDE_STARTUP" == "1" ]]; then
FLAGS+=("-Dminecraft.api.auth.host=https://authserver.mojang.com/ -Dminecraft.api.account.host=https://api.mojang.com/ -Dminecraft.api.services.host=https://api.minecraftservices.com/ -Dminecraft.api.session.host=https://api.minehut.com/mitm/proxy")
fi

SERVER_MEMORY_REAL=$(($SERVER_MEMORY*($MAXIMUM_RAM/100)))
PARSED="java ${FLAGS[*]} -Xms${SERVER_MEMORY_REAL} -Xmx${SERVER_MEMORY_REAL} ${JAVA_OPTS} -jar ${SERVER_JARFILE}"
SERVER_MEMORY_MULTIPLIER=$(($MAXIMUM_RAM/100))
SERVER_MEMORY_REAL=$(($SERVER_MEMORY*$SERVER_MEMORY_MULTIPLIER))
PARSED="java ${FLAGS[*]} -Xms${SERVER_MEMORY_REAL} -Xmx${SERVER_MEMORY_REAL} -jar ${SERVER_JARFILE}"

# Display the command we're running in the output, and then execute it with the env
# from the container itself.
Expand Down

0 comments on commit 2bb56b3

Please sign in to comment.