Browse Source

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

main
Bastian (BaM) 3 months ago
parent
commit
8bfc28dc83
  1. 6
      scripts/auto-boot-ollama-host.sh

6
scripts/auto-boot-ollama-host.sh

@ -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
Loading…
Cancel
Save