From 8e4545653d62d23722c711674f8fb31da57c8734 Mon Sep 17 00:00:00 2001 From: Wild1145 Date: Sun, 27 Jun 2021 18:48:41 +0100 Subject: [PATCH] Move the launch params as they will be global and change everywhere (hopefully) --- FreeOP Servers/.env.sh | 6 +++++- FreeOP Servers/spigot-restart.sh | 2 +- FreeOP Servers/start.sh | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/FreeOP Servers/.env.sh b/FreeOP Servers/.env.sh index 39d30b9..26a2b42 100644 --- a/FreeOP Servers/.env.sh +++ b/FreeOP Servers/.env.sh @@ -7,4 +7,8 @@ PAPER_JAR_NAME="paperclip.jar" # DO NOT Change these ones SCREEN_NAME="TotalFreedom" SARCASTIC_MESSAGE="The server is not running... Why don't you try starting it? <3" -RESET_FILE=/home/tfserver/.resetting \ No newline at end of file +RESET_FILE=/home/tfserver/.resetting +JVM_LAUNCH_OPTS="-XX:+CMSClassUnloadingEnabled -XX:ParallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10" + +#Java 16 Launch Opts +#JVM_LAUNCH_OPTS="-illegal-access=permit -XX:ParallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10" \ No newline at end of file diff --git a/FreeOP Servers/spigot-restart.sh b/FreeOP Servers/spigot-restart.sh index 460d11f..032d000 100644 --- a/FreeOP Servers/spigot-restart.sh +++ b/FreeOP Servers/spigot-restart.sh @@ -30,6 +30,6 @@ if screen -list | grep -q "$SCREEN_NAME"; then echo "ERROR - We have been unable to re-start the server... Please execute this manually" else - screen -dmS $SCREEN_NAME java -Xms$JVM_HEAP -Xmx$JVM_HEAP -XX:+CMSClassUnloadingEnabled -XX:ParallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -jar $PAPER_JAR_NAME + screen -dmS $SCREEN_NAME java -Xms$JVM_HEAP -Xmx$JVM_HEAP $JVM_LAUNCH_OPTS -jar $PAPER_JAR_NAME echo "Server Started" fi diff --git a/FreeOP Servers/start.sh b/FreeOP Servers/start.sh index 631dabb..72406d8 100644 --- a/FreeOP Servers/start.sh +++ b/FreeOP Servers/start.sh @@ -11,7 +11,7 @@ else then echo "ERROR - There is an instance of the server already running. Make sure it is killed first and try again" else - screen -dmS $SCREEN_NAME java -Xms$JVM_HEAP -Xmx$JVM_HEAP -XX:+CMSClassUnloadingEnabled -XX:ParallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -jar $PAPER_JAR_NAME + screen -dmS $SCREEN_NAME java -Xms$JVM_HEAP -Xmx$JVM_HEAP $JVM_LAUNCH_OPTS -jar $PAPER_JAR_NAME echo "Server Started" fi fi