firmware/src/packages/fff/fff-wireguard/files/usr/lib/nodewatcher.d/15-wireguard.sh

9 lines
234 B
Bash
Executable File

#!/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>$vpn_active</vpn_active>"