Alive check improvements

This commit is contained in:
mathiascode 2019-09-27 15:45:00 +03:00
parent a25a927895
commit 88bff9c766
3 changed files with 3 additions and 9 deletions

View file

@ -11,8 +11,6 @@ chmod -R 500 plugins/bStats/ plugins/PluginMetrics/ plugins/ProtocolLib/
git clone git@github.com:kaboomserver/schematics.git plugins/FastAsyncWorldEdit/schematics/
tmux set -g status off
while true; do
tmux new -d -s server 'sh -c script/server' >/dev/null
tmux new -d -s remote 'sh -x script/remote' >/dev/null
@ -21,11 +19,5 @@ while true; do
done &
ttyd -p $PORT sh -c script/console &
sleep 30
while true; do
tmux new -d -s alivecheck 'sh -x script/alivecheck' >/dev/null
sleep 5
done &
sleep infinity

View file

@ -1,6 +1,6 @@
#!/bin/sh
while true; do
sleep 180
sleep 420
logfile=$HOME/logs/latest.log
if [ "$(env printf '\xFE' | nc -w 5 localhost 25565 | wc -m)" -eq 0 ]; then
if [ -f "$logfile" ]; then

View file

@ -1,6 +1,8 @@
#!/bin/sh
while true; do
stty intr undef
tmux new -d -s alivecheck 'sh -x script/alivecheck'
java -Xmx384M -Xss512k -Xaggressive -Xcompressedrefs -Xdump:none -Xgcpolicy:balanced -Xcompactexplicitgc -Xcompactgc -Xquickstart -Xshareclasses -XX:-HeapDumpOnOutOfMemoryError -XX:MaxDirectMemorySize=64M -XX:+UseContainerSupport -Dcom.mojang.eula.agree=true -Dpaper.playerconnection.keepalive=360 -DIReallyKnowWhatIAmDoingISwear -jar minecraft-server.jar --world-dir=worlds
tmux kill-session -t alivecheck
sleep 1
done