buildpack/script/server.sh

13 lines
805 B
Bash
Raw Normal View History

#!/bin/sh
2019-11-30 18:05:23 +00:00
# The alive checker and Minecraft server is started at the same time. For performance reasons, the
# OpenJ9 JVM is used instead of Java's default Hotspot JVM.
chmod -R 500 $HOME/plugins/bStats/ $HOME/plugins/PluginMetrics/
2019-11-30 18:57:33 +00:00
dtach -n alivecheck $HOME/script/alivecheck.sh
2019-11-30 18:05:23 +00:00
while true; do
2019-12-30 15:50:35 +00:00
java -Xmx384M -Xtune:virtualized -Xaggressive -Xcompressedrefs -Xdump:none -Xgc:concurrentScavenge -Xgc:dnssExpectedTimeRatioMaximum=3 -Xgc:scvNoAdaptiveTenure -Xdisableexplicitgc -Xshareclasses -Xshareclasses:noPersistentDiskSpaceCheck -XX:-HeapDumpOnOutOfMemoryError -XX:OnOutofMemoryError="pkill -9 java" -XX:MaxDirectMemorySize=64M -XX:+UseContainerSupport -Dlog4j.configurationFile=script/log4j2.xml -Dpaper.playerconnection.keepalive=360 -DIReallyKnowWhatIAmDoingISwear -jar server.jar
sleep 1
done