You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
303 B

  1. #!/bin/sh
  2. # check if wireguard
  3. if [ "${DEVTYPE}" != "wireguard" ]; then
  4. exit 0
  5. fi
  6. # check if correct naming
  7. slicedint=$(echo "$INTERFACE" | cut -c1-3)
  8. if [ "${slicedint}" != "wg_" ]; then
  9. exit 0
  10. fi
  11. if [ "${ACTION}" = "add" ]; then
  12. ubus call babeld add_interface '{"ifname":'\""$INTERFACE"\"'}'
  13. fi