aboutsummaryrefslogtreecommitdiff
path: root/net/wg-installer/wg-server/hotplug.d/99-mesh-babeld
blob: d3ef3e39c49b2508136f02134f7272db18e06a15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/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