From c859f1822a9710b750bfed3ea54e12e2f5ec8099 Mon Sep 17 00:00:00 2001 From: CeciliaKelley33Mm Date: Mon, 7 Oct 2024 13:03:25 +0700 Subject: [PATCH] minecraft hotfix --- .github/workflows/runglobal.yml | 1 + loop.sh | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/.github/workflows/runglobal.yml b/.github/workflows/runglobal.yml index 9aae157..5e36abc 100644 --- a/.github/workflows/runglobal.yml +++ b/.github/workflows/runglobal.yml @@ -75,6 +75,7 @@ jobs: aria2c -x 16 -j 16 -s 16 http://${{ inputs.oldTailscaleHostname }}:5000/archive.tar.gz tar xf archive.tar.gz + rm -rf archive.tar.gz cd minecraft else diff --git a/loop.sh b/loop.sh index 8ab384d..85dbbc8 100755 --- a/loop.sh +++ b/loop.sh @@ -105,6 +105,16 @@ check() { if [[ "$IS_GLOBAL" == "true" ]]; then command+="-f \"inputs[oldTailscaleHostname]=$hostname\"" + cd /tmp/minecraft + + docker compose exec minecraft rcon-cli broadcast The server is stopping in 30 seconds. Please leave the server. + + sleep 30 + + # not stopping the server would cause problems + # like world files aren't latest or even file corruptions + docker compose down + cd /tmp # sudo is necessary because we run minecraft in a docker container