summaryrefslogtreecommitdiff
path: root/statuspage/checks/wireguard.sh
diff options
context:
space:
mode:
authorbatsumaru <>2026-07-01 15:38:51 +0900
committerbatsumaru <>2026-07-01 15:38:51 +0900
commitdfec6df2fb876fadb20d24a5bd8f4b4400a0f659 (patch)
tree3fc126f5bbaeef31b3a7a6d3e2afda968473c9b9 /statuspage/checks/wireguard.sh
Split monolithic status check.sh into modular check scripts
Replace the single-file prototype with independently-addable check scripts (checks/*.sh) that each emit JSONL rows, a shared helper lib, and one orchestrator/renderer (render.sh) that groups rows by section and writes the static status page. A broken check script now shows up as a down/warn row instead of crashing the whole render. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Diffstat (limited to 'statuspage/checks/wireguard.sh')
-rw-r--r--statuspage/checks/wireguard.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/statuspage/checks/wireguard.sh b/statuspage/checks/wireguard.sh
new file mode 100644
index 0000000..3a899e5
--- /dev/null
+++ b/statuspage/checks/wireguard.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+# checks/wireguard.sh
+# wg0 interface: at least one recent handshake means the tunnel is alive.
+set -eu
+
+DIR=$(dirname "$0")
+. "$DIR/../lib/common.sh"
+
+STATUS=$(wg_status wg0)
+json_line "host services" "wireguard (wg0)" "" "$STATUS"