#!/usr/bin/env bash
# backup-node/status — outputs {"restic":"<version>"} or {"restic":null}.
set -euo pipefail
cat >/dev/null
if command -v restic >/dev/null; then
  jq -n --arg v "$(restic version | awk '{print $2}')" '{restic:$v}' > "$SSR_OUTPUTS"
else
  echo '{"restic":null}' > "$SSR_OUTPUTS"
fi
