summaryrefslogtreecommitdiff
path: root/statuspage/checks/wg-watcher.sh
blob: 9351afd7a244fac47b2fa11fbdf7aa50d70981e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
# checks/wg-watcher.sh
# wg-quick's background route monitor (spawned by `wg-quick up wg0` to
# react to WAN interface/address changes) isn't rc.d-managed, so there's
# no `service ... status` for it. If it dies, wg0 itself stays up - the
# kernel interface doesn't depend on it - but the box stops reacting to
# WAN IP changes (e.g. a DHCP lease renewal) until wg-quick is restarted.
set -eu

DIR=$(dirname "$0")
. "$DIR/../lib/common.sh"

STATUS=$(proc_running "route -n monitor")
json_line "host services" "wg-quick watcher" "" "$STATUS"