From 60df31282c53524f5c6e3414e9d9c12b1715fe41 Mon Sep 17 00:00:00 2001 From: Christian Dresel Date: Fri, 29 Jan 2021 09:09:10 +0100 Subject: [PATCH] fff-wireguard: Add nodewatcher Script With this script the monitoring have the correct information that the router is connectet with wireguard or not. Signed-off-by: Christian Dresel --- .../files/usr/lib/nodewatcher.d/15-wireguard.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 src/packages/fff/fff-wireguard/files/usr/lib/nodewatcher.d/15-wireguard.sh diff --git a/src/packages/fff/fff-wireguard/files/usr/lib/nodewatcher.d/15-wireguard.sh b/src/packages/fff/fff-wireguard/files/usr/lib/nodewatcher.d/15-wireguard.sh new file mode 100755 index 00000000..eba59b4d --- /dev/null +++ b/src/packages/fff/fff-wireguard/files/usr/lib/nodewatcher.d/15-wireguard.sh @@ -0,0 +1,8 @@ +#!/bin/sh +# Netmon Nodewatcher (C) 2010-2012 Freifunk Oldenburg +# License; GPL v3 + +# Checks if wireguard has peers +vpn_active=0 +wg | grep hands >/dev/null && vpn_active=1 +SYSTEM_DATA="$SYSTEM_DATA$vpn_active"