diff --git a/scripts/redeploy-bridged.sh b/scripts/redeploy-bridged.sh index 854a977..69564d8 100755 --- a/scripts/redeploy-bridged.sh +++ b/scripts/redeploy-bridged.sh @@ -32,7 +32,11 @@ REPO="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" BRIDGED="$REPO/bridged" JAR="$BRIDGED/target/bridged.jar" OUT="$BRIDGED/bridged.out" -PATTERN='bridged/target/bridged.jar' +# Matches BOTH the absolute form and the relative `java -jar target/bridged.jar` a hand-start +# produces from inside bridged/. Anchoring on the absolute path alone was a real bug: the daemon +# restarted correctly and the script still reported "no process appeared", because it launched with +# a relative path and then looked for an absolute one. +PATTERN='target/bridged.jar' HEALTH='http://127.0.0.1:8765/healthz' STOP_WAIT=30 # seconds to wait for a clean exit before reporting failure HEALTH_WAIT=60 # seconds to wait for /healthz to answer after start @@ -143,7 +147,9 @@ fi # because the daemon resolves bridged.yaml, logs/ and target/ relative to it. say "start" -( cd "$BRIDGED" && zsh -lc 'nohup java -jar target/bridged.jar >> bridged.out 2>&1 &' ) +# Absolute jar path so `ps` names which checkout is running; cwd still bridged/ because the daemon +# resolves bridged.yaml, logs/ and target/ relative to it. +( cd "$BRIDGED" && zsh -lc "nohup java -jar '$JAR' >> bridged.out 2>&1 &" ) for _ in $(seq 10); do NEW_PID="$(running_pid)"