We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
PAUSE_IF_NO_PLAYERS
1 parent fa69780 commit 18cc11bCopy full SHA for 18cc11b
scripts/opt/backup-loop.sh
@@ -655,11 +655,13 @@ while true; do
655
if [[ ${PAUSE_IF_NO_PLAYERS^^} = TRUE ]]; then
656
while true; do
657
if is_paused; then
658
+ log INFO "Server is paused, waiting ${PLAYERS_ONLINE_CHECK_INTERVAL}..."
659
sleep "${PLAYERS_ONLINE_CHECK_INTERVAL}"
660
elif ! PLAYERS_ONLINE=$(mc-monitor status --host "${SERVER_HOST}" --port "${SERVER_PORT}" --show-player-count 2>&1); then
661
log ERROR "Error querying the server, waiting ${PLAYERS_ONLINE_CHECK_INTERVAL}..."
662
663
elif [ "${PLAYERS_ONLINE}" = 0 ]; then
664
+ log INFO "No players online, waiting ${PLAYERS_ONLINE_CHECK_INTERVAL}..."
665
666
else
667
break
0 commit comments