diff --git a/ops/README.md b/ops/README.md index edad558..d02fac6 100644 --- a/ops/README.md +++ b/ops/README.md @@ -37,5 +37,6 @@ From mac15, run: ./ops/infra-healthcheck.sh ``` -It emits JSON checks for mac15, WSL, Windows, mac13, and Aliyun. The script is -read-only; a failed check does not restart or mutate any service. +It emits JSON checks for mac15, WSL, Windows, mac13, and Aliyun, including the +release-sync timer state and the last successful Gitea/Homebrew promotion. The +script is read-only; a failed check does not restart or mutate any service. diff --git a/ops/infra-healthcheck.sh b/ops/infra-healthcheck.sh index ea0fa65..015617d 100755 --- a/ops/infra-healthcheck.sh +++ b/ops/infra-healthcheck.sh @@ -38,6 +38,8 @@ results=( "$(check_local_proxy)" "$(check_ssh wsl_tailscale wsl-dev 'tailscale ip -4')" "$(check_ssh wsl_frp wsl-dev 'docker inspect -f "{{.State.Status}}" frpc-wsl-gateway')" + "$(check_ssh wsl_release_sync_timer wsl-dev 'test "$(systemctl is-enabled seal-use-release-sync.timer 2>/dev/null)" = enabled && test "$(systemctl is-active seal-use-release-sync.timer 2>/dev/null)" = active && printf "timer=enabled,active"')" + "$(check_ssh wsl_release_sync_last_success wsl-dev 'journalctl -q -u seal-use-release-sync.service -n 200 --no-pager | grep -E "fully synchronized to Gitea and Homebrew" | tail -1')" "$(check_ssh wsl_gitea wsl-dev 'curl -sS -o /dev/null -w "gitea_http=%{http_code}" http://127.0.0.1:3001/api/v1/version')" "$(check_ssh wsl_github_proxy wsl-dev 'HTTPS_PROXY=http://192.168.3.62:7897 HTTP_PROXY=http://192.168.3.62:7897 NO_PROXY=127.0.0.1,localhost curl -sS -o /dev/null --connect-timeout 8 --max-time 15 -w "github_http=%{http_code}" https://github.com')" "$(check_ssh windows_tailscale windows '"C:\Program Files\Tailscale\tailscale.exe" ip -4')"