Compare commits

...

1 Commits

Author SHA1 Message Date
Christian Dresel ffe4d43b8a fff-network: Add Interfacetype to nodewatcher data
Some monitoring require information about which interface type an interface is.
We may add more interface types in the future.

Signed-off-by: Christian Dresel <freifunk@dresel.systems>
2022-04-10 11:42:59 +02:00
1 changed files with 3 additions and 0 deletions

View File

@ -63,6 +63,9 @@ for filename in $(grep 'up\|unknown' /sys/class/net/*/operstate); do
/width/{ split($0, w, ": "); sub(/ .*/, "", w[2]); printf "<wlan_width>"w[2]"</wlan_width>" }
')
#Add Interfacetype (e.g. wireguard, fastd, vxlan, ether, etc) to nodewatcher data
wg show "${iface}" &> /dev/null && interface_data=$interface_data"<type>wireguard</type>"
interface_data=$interface_data"</$iface>"
done