diff --git a/Dockerfile b/Dockerfile index 476ff02..911ba01 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ FROM alpine:3.20 # Install minimal tooling RUN apk add --no-cache \ --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing wol \ - && apk add --no-cache bash curl ca-certificates + && apk add --no-cache bash curl ca-certificates docker-cli # Copy script WORKDIR /app diff --git a/scripts/auto-boot-ollama-host.sh b/scripts/auto-boot-ollama-host.sh index 3332df2..d01066e 100644 --- a/scripts/auto-boot-ollama-host.sh +++ b/scripts/auto-boot-ollama-host.sh @@ -27,28 +27,22 @@ send_wol() { wol -i "$WOL_BCAST" -p "$WOL_PORT" "$WOL_MAC" || true } - # Basic pre-flight: show which container is watched 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 # echo "$line" # uncomment for debugging if echo "$line" | grep -qE "${ERROR_PATTERN}"; then log "Detected EHOSTUNREACH for Ollama (${OLLAMA_HOST}:${OLLAMA_PORT})." - echo ok # ... in your remediation block: if [[ -n "$WOL_MAC" ]]; then log "Sending WOL to $WOL_MAC via ${WOL_BCAST}:${WOL_PORT}" - #send_wol + send_wol fi - echo ok # --- remediation examples (optional) --- # if [[ -n "$WOL_MAC" ]]; then # log "Sending WOL to ${WOL_MAC}"