#!/bin/bash
set -euo pipefail

if curl -sf http://127.0.0.1:8080/api/health >/dev/null 2>&1; then
  curl -sf http://127.0.0.1:8080/api/update/check >/dev/null || true
else
  /usr/bin/mymo-client --check-updates || true
fi
