Skip to content

Commit 18cc11b

Browse files
authored
Add more logs when PAUSE_IF_NO_PLAYERS is used (#203)
1 parent fa69780 commit 18cc11b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scripts/opt/backup-loop.sh

+2
Original file line numberDiff line numberDiff line change
@@ -655,11 +655,13 @@ while true; do
655655
if [[ ${PAUSE_IF_NO_PLAYERS^^} = TRUE ]]; then
656656
while true; do
657657
if is_paused; then
658+
log INFO "Server is paused, waiting ${PLAYERS_ONLINE_CHECK_INTERVAL}..."
658659
sleep "${PLAYERS_ONLINE_CHECK_INTERVAL}"
659660
elif ! PLAYERS_ONLINE=$(mc-monitor status --host "${SERVER_HOST}" --port "${SERVER_PORT}" --show-player-count 2>&1); then
660661
log ERROR "Error querying the server, waiting ${PLAYERS_ONLINE_CHECK_INTERVAL}..."
661662
sleep "${PLAYERS_ONLINE_CHECK_INTERVAL}"
662663
elif [ "${PLAYERS_ONLINE}" = 0 ]; then
664+
log INFO "No players online, waiting ${PLAYERS_ONLINE_CHECK_INTERVAL}..."
663665
sleep "${PLAYERS_ONLINE_CHECK_INTERVAL}"
664666
else
665667
break

0 commit comments

Comments
 (0)