diff options
Diffstat (limited to 'statuspage/checks/wg-watcher.sh')
| -rwxr-xr-x | statuspage/checks/wg-watcher.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/statuspage/checks/wg-watcher.sh b/statuspage/checks/wg-watcher.sh new file mode 100755 index 0000000..9351afd --- /dev/null +++ b/statuspage/checks/wg-watcher.sh @@ -0,0 +1,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" |
