Move infinite sleep to the correct position in the script to prevent premature exit
This commit is contained in:
@@ -32,6 +32,9 @@ send_wol() {
|
||||
log "Watching logs for container='${CONTAINER_NAME}' since='${SINCE}'"
|
||||
log "Looking for pattern: ${ERROR_PATTERN}"
|
||||
|
||||
echo "Exited. Sleeping..."
|
||||
sleep infinity
|
||||
|
||||
# Stream logs and parse
|
||||
"${DOCKER_CLI}" logs -f --since "${SINCE}" "${CONTAINER_NAME}" 2>&1 | \
|
||||
while IFS= read -r line; do
|
||||
@@ -58,6 +61,3 @@ while IFS= read -r line; do
|
||||
# log "Ollama reachable again."
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Exited. Sleeping..."
|
||||
sleep infinity
|
||||
Reference in New Issue
Block a user