-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.sh
28 lines (24 loc) · 1.42 KB
/
start.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
#Check the java version
echo "-------------------------------------------------------------------------------"
java --version
echo "-------------------------------------------------------------------------------"
#Warn you that the server will start
echo "Starting in five seconds, press Ctrl-C to cancel."
sleep 1
echo "Starting in four seconds, press Ctrl-C to cancel."
sleep 1
echo "Starting in three seconds, press Ctrl-C to cancel."
sleep 1
echo "Starting in two seconds, press Ctrl-C to cancel."
sleep 1
echo "Starting in one second, press Ctrl-C to cancel."
sleep 1
echo "Starting, press Ctrl-C to cancel."
echo "-------------------------------------------------------------------------------"
#Starting the server
while [ true ]; do
java -Xms8192M -Xmx8192M --add-modules=jdk.incubator.vector -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -jar server.jar
echo Server restarting...
echo Press CTRL + C to stop.
done