8 lines
286 B
Cheetah
Raw Normal View History

#!/bin/sh
2024-11-05 17:37:33 -07:00
gateway=`getent ahostsv4 tinc | awk '{ print \$1 }' | head -n 1`
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?"