diff --git a/bin/start b/bin/start index 9e4ae3a..0c4aa03 100755 --- a/bin/start +++ b/bin/start @@ -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 diff --git a/script/alivecheck b/script/alivecheck index 6710f43..ade0f64 100755 --- a/script/alivecheck +++ b/script/alivecheck @@ -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 diff --git a/script/server b/script/server index aff5dc5..6c43344 100755 --- a/script/server +++ b/script/server @@ -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