#!/usr/bin/env bash set -euo pipefail repo=/mnt/hermes-workspace/alt-controller-image-rs printf 'Native image-builder heartbeat\n' printf 'UTC: '; date -u '+%Y-%m-%dT%H:%M:%SZ' printf 'HEAD: '; git -C "$repo" log -1 --format='%h %ad %s' --date=iso-strict printf 'Worker: ' if pgrep -af 'hermes verify --json|alt-controller-image|hsh-install|hsh --initroot' >/dev/null; then printf 'active\n' else printf 'idle between scheduled runs\n' fi printf 'Working tree: ' if test -n "$(git -C "$repo" status --porcelain)"; then printf 'uncommitted changes present\n' else printf 'clean\n' fi