Commit327690aaRecorded21 Apr 2026Repositoryvigil

Merge task/adopt-runit-supervision

Message

Add runit supervision templates under deploy/runit/. Production rollout completed in the sc-ops adopt-runit-supervision task — /etc/service/vigil/ is supervised by runit (currently in down state pending a vigil rebuild; the known-broken binary from 2026-04-20 is being tracked separately).

See folio procedures/openbsd-runit-supervision for the replication guide.

Changed
 deploy/runit/log-run |  7 +++++++
 deploy/runit/run     | 14 ++++++++++++++
 2 files changed, 21 insertions(+)
Diff

A merge. Shown against its first parent, so this is the effect of merging rather than the work of the branch.

deploy/runit/log-runadded
@@ -0,0 +1,7 @@
+1
#!/bin/sh
+2
# runit log-service run script for vigil.
+3
# Install at /etc/service/vigil/log/run on the production host (chmod +x).
+4
# svlogd writes timestamped, rotated logs to /var/log/vigil/.
+5
# -tt prefixes each line with a tai64n timestamp (use `tai64nlocal` to read).
+6
+7
exec chpst -u _vigil:_vigil svlogd -tt /var/log/vigil
deploy/runit/runadded
@@ -0,0 +1,14 @@
+1
#!/bin/sh
+2
# runit supervisor run script for vigil.
+3
# Install at /etc/service/vigil/run on the production host (chmod +x).
+4
# See folio procedures/openbsd-runit-supervision for the full replication guide.
+5
+6
# Restart audit trail — runit has no built-in supervisor event log, so each
+7
# invocation writes one line. Greppable by `grep vigil /var/log/service-restarts.log`.
+8
echo "$(date -u +%FT%TZ) vigil run invoked pid=$$" >> /var/log/service-restarts.log
+9
+10
# Merge stderr into stdout so svlogd captures everything.
+11
exec 2>&1
+12
+13
cd /var/www/vigil
+14
exec chpst -u _vigil:_vigil /usr/local/bin/vigil serve --config /var/www/vigil/vigil.sgl