2023-04-24 15:54:05 -06:00
|
|
|
#!/bin/sh
|
2024-11-05 17:37:33 -07:00
|
|
|
gateway=`getent ahostsv4 tinc | awk '{ print \$1 }' | head -n 1`
|
2023-04-24 15:54:05 -06:00
|
|
|
route="${network_address}/${global_prefix:-16}"
|
|
|
|
iface="eth0"
|
|
|
|
|
|
|
|
echo "Routing \$route to \$gateway via \$iface"
|
2024-02-23 17:34:19 -07:00
|
|
|
ip route add \$route via \$gateway dev \$iface || echo "Failed to add route; does it already exist?"
|