Move infinite sleep to the correct position in the script to prevent premature exit

This commit is contained in:
Bastian (BaM)
2025-09-13 20:01:27 +02:00
parent 11f9c8d6d5
commit 8bfc28dc83

View File

@@ -32,6 +32,9 @@ send_wol() {
log "Watching logs for container='${CONTAINER_NAME}' since='${SINCE}'" log "Watching logs for container='${CONTAINER_NAME}' since='${SINCE}'"
log "Looking for pattern: ${ERROR_PATTERN}" log "Looking for pattern: ${ERROR_PATTERN}"
echo "Exited. Sleeping..."
sleep infinity
# Stream logs and parse # Stream logs and parse
"${DOCKER_CLI}" logs -f --since "${SINCE}" "${CONTAINER_NAME}" 2>&1 | \ "${DOCKER_CLI}" logs -f --since "${SINCE}" "${CONTAINER_NAME}" 2>&1 | \
while IFS= read -r line; do while IFS= read -r line; do
@@ -58,6 +61,3 @@ while IFS= read -r line; do
# log "Ollama reachable again." # log "Ollama reachable again."
fi fi
done done
echo "Exited. Sleeping..."
sleep infinity