2024-02-23 17:34:19 -07:00

8 lines
270 B
Bash

#!/bin/sh
gateway=`getent hosts tinc | awk '{ print $1 }'`
route="${network_address}/${global_prefix:-16}"
iface="eth0"
echo "Routing \$route to \$gateway via \$iface"
ip route add \$route via \$gateway dev \$iface || echo "Failed to add route; does it already exist?"