diff --git a/minecraft/mc-router.yaml b/minecraft/mc-router.yaml index e33ba06..cd4e06e 100644 --- a/minecraft/mc-router.yaml +++ b/minecraft/mc-router.yaml @@ -142,7 +142,7 @@ metadata: name: mc-shutdown namespace: minecraft spec: - schedule: "*/5 * * * *" + schedule: "*/30 * * * *" concurrencyPolicy: Forbid jobTemplate: spec: @@ -183,8 +183,8 @@ data: #!/bin/bash MC_PODS=$(kubectl get pods -l containertype=minecraft-server -o=jsonpath="{range .items[*]}{.metadata.name},"| sed 's/,/\n/g') for p in $MC_PODS; do - echo "found minecraft pod $p, sleeping 120 seconds to prevent shutdown before login" - sleep 120 + echo "found minecraft pod $p, sleeping 300 seconds to prevent shutdown before login" + sleep 300 deployment=$(echo $p |sed 's/-0//g') # check online player count in the mc server if [[ $(kubectl exec -i $p -- /usr/local/bin/mc-monitor status) == *"online=0"* ]] ;then