From 679490a8d3f27857e004706682c2b3f5f56b91ba Mon Sep 17 00:00:00 2001 From: NullBite Date: Sat, 17 Jun 2023 00:56:24 -0400 Subject: [PATCH] Minor improvements to sample instance files --- instance/start.bat | 2 +- instance/start.sh | 2 ++ instance/vars.example | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/instance/start.bat b/instance/start.bat index eb6fc34..8f5ec06 100755 --- a/instance/start.bat +++ b/instance/start.bat @@ -1,4 +1,4 @@ :;cd "$(dirname "$0")"; exec ./tmux.sh @echo off cd /D "%~dp0" -java -Xmx1024M -Xms1024M -jar server.jar nogui +java -Dlog4j2.formatMsgNoLookups=true -Xmx1024M -Xms1024M -jar server.jar nogui diff --git a/instance/start.sh b/instance/start.sh index fa539ec..f0853a3 100755 --- a/instance/start.sh +++ b/instance/start.sh @@ -6,5 +6,7 @@ if ! [[ -e ./vars ]] ; then fi source ./vars +JAVA="${JAVA:-java}" + command "$JAVA" $JAVA_PARAMS -jar "$SERVER" nogui sleep 10 diff --git a/instance/vars.example b/instance/vars.example index 6fbb89a..476ccc3 100755 --- a/instance/vars.example +++ b/instance/vars.example @@ -1,3 +1,8 @@ +#!/bin/bash JAVA_PARAMS="-Dlog4j2.formatMsgNoLookups=true -Xmx1024M -Xms1024M" JAVA=java SERVER=server.jar +# Overriding $PATH can be useful to force third party launch scripts to use the +# correct Java, and is just a more elegant way than the above method. +# For example: +# PATH="/usr/lib/jvm/java-17-openjdk/bin:$PATH" ; export PATH