#!/usr/bin/env bash # Starts the app so you can poke at it by hand: curl localhost:8080/actuator/health, # curl localhost:8080/actuator/circuitbreakers, etc. Kills any previous instance first. set -euo pipefail cd "$(dirname "$0")/.." for p in $(ps -eo pid,cmd | grep '[R]esilienceBoot4DemoApplication' | awk '{print $1}'); do kill -9 "$p" || true done setsid nohup mvn -B -q org.springframework.boot:spring-boot-maven-plugin:run \ > /tmp/resilience-boot4-demo.log 2>&1 < /dev/null & echo "starting, waiting for :8080/actuator/health ..." for i in $(seq 1 60); do if curl -s -o /dev/null localhost:8080/actuator/health; then echo "up." exit 0 fi sleep 2 done echo "did not come up in 120s -- check /tmp/resilience-boot4-demo.log" exit 1