d73ff9b0fb
Deploy Site / deploy-vercel (push) Has been cancelled
Deploy Site / deploy-docs (push) Has been cancelled
Docker / shell lint / Lint Dockerfile (hadolint) (push) Has been cancelled
Docker / shell lint / Lint docker/ shell scripts (shellcheck) (push) Has been cancelled
Docker Build and Publish / build-amd64 (push) Has been cancelled
Docker Build and Publish / build-arm64 (push) Has been cancelled
Lint (ruff + ty) / ruff + ty diff (push) Has been cancelled
Lint (ruff + ty) / ruff enforcement (blocking) (push) Has been cancelled
Lint (ruff + ty) / Windows footguns (blocking) (push) Has been cancelled
Nix Lockfile Fix / auto-fix-main (push) Has been cancelled
Nix Lockfile Fix / fix (push) Has been cancelled
Nix / nix (macos-latest) (push) Has been cancelled
Nix / nix (ubuntu-latest) (push) Has been cancelled
OSV-Scanner / Scan lockfiles (push) Has been cancelled
Build Skills Index / build-index (push) Has been cancelled
Tests / test (1) (push) Has been cancelled
Tests / test (2) (push) Has been cancelled
Tests / test (3) (push) Has been cancelled
Tests / test (4) (push) Has been cancelled
Tests / test (5) (push) Has been cancelled
Tests / test (6) (push) Has been cancelled
Tests / e2e (push) Has been cancelled
uv.lock check / uv lock --check (push) Has been cancelled
Docker Build and Publish / merge (push) Has been cancelled
Build Skills Index / trigger-deploy (push) Has been cancelled
Tests / save-durations (push) Has been cancelled
30 lines
1.2 KiB
Plaintext
Executable File
30 lines
1.2 KiB
Plaintext
Executable File
#!/command/with-contenv sh
|
|
# shellcheck shell=sh
|
|
# Dashboard finish script. Companion to ./run.
|
|
#
|
|
# When HERMES_DASHBOARD is unset (or falsy), ./run exits 0 immediately.
|
|
# Without this finish script, s6-supervise would just restart the run
|
|
# script in a tight loop. By exiting 125 here, we tell s6-supervise
|
|
# "this service has permanently failed; do not restart" — equivalent
|
|
# to `s6-svc -O`. The supervise slot reports as down, matching reality
|
|
# (no dashboard process is running).
|
|
#
|
|
# When HERMES_DASHBOARD IS enabled and the run script later exits or
|
|
# is killed, we want s6-supervise to restart it (the whole point of
|
|
# supervised lifecycle). So we exit non-125 in that case.
|
|
|
|
# Arguments passed to a finish script: $1=run-exit-code, $2=signal-num,
|
|
# $3=service-dir-name, $4=run-pgid. See servicedir(7).
|
|
|
|
case "${HERMES_DASHBOARD:-}" in
|
|
1|true|TRUE|True|yes|YES|Yes)
|
|
# Dashboard was enabled — let s6-supervise restart on crash by
|
|
# exiting non-125. (Pass-through any sensible default.)
|
|
exit 0
|
|
;;
|
|
*)
|
|
# Dashboard disabled — permanent-failure marker so s6-supervise
|
|
# leaves the slot in 'down' state and s6-svstat reflects that.
|
|
exit 125
|
|
;;
|
|
esac |