0
0
mirror of https://github.com/openwrt/packages.git synced 2025-03-15 11:28:35 +00:00
packages/net/wg-installer/wg-server/hotplug.d/99-mesh-babeld

17 lines
303 B
Plaintext
Raw Normal View History

#!/bin/sh
# check if wireguard
if [ "${DEVTYPE}" != "wireguard" ]; then
exit 0
fi
# check if correct naming
slicedint=$(echo "$INTERFACE" | cut -c1-3)
if [ "${slicedint}" != "wg_" ]; then
exit 0
fi
if [ "${ACTION}" = "add" ]; then
ubus call babeld add_interface '{"ifname":'\""$INTERFACE"\"'}'
fi