Skip to content

Commit b620d96

Browse files
committed
Fixing memory allocation
Memory variable do not get recognized when set within 'JVM_OPTS', but they do get recognized when set within 'MAX_MEMORY' and 'INIT_MEMORY'
1 parent 52ef781 commit b620d96

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/minecraftctl.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,16 @@ function start {
6666
vol_mount=""
6767
echo "Ephemeral server, a restart will lose all world data"
6868
fi
69-
69+
# -e "JVM_OPTS=-Xmx${MAXHEAP}M -Xms${MINHEAP}M -D${name}" \
7070
$DOCKER run -d -i \
7171
--name "$name" \
7272
$vol_mount \
7373
-p $PORT:25565 \
7474
-p $RCON_PORT:25575 \
7575
-e "RCON_PASSWORD=${RCON_PASSWORD}" \
76-
-e "JVM_OPTS=-Xmx${MAXHEAP}M -Xms${MINHEAP}M -D${name}" \
76+
-e "JVM_OPTS=-D${name}" \
77+
-e "INIT_MEMORY=${MINHEAP}M" \
78+
-e "MAX_MEMORY=${MAXHEAP}M" \
7779
-e "JVM_XX_OPTS=$EXTRA_JVM_OPTS" \
7880
-e "EULA=$EULA" \
7981
-e "TYPE=$TYPE" \

0 commit comments

Comments
 (0)