Update and rename lixonet.sh to lixonet.sh.tmpl

This commit is contained in:
Manevolent 2023-04-24 15:54:05 -06:00 committed by GitHub
parent efa17ce9bb
commit 708411ef1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -1,5 +0,0 @@
#!/bin/sh
gateway=`nslookup tinc | awk -F': ' 'NR==6 { print $2 } '`
route="172.31.0.0/16"
iface="eth0"
ip route add $route via $gateway dev $iface

View File

@ -0,0 +1,7 @@
#!/bin/sh
gateway=`nslookup tinc | awk -F': ' 'NR==6 { print \$2 } '`
route="${network_address}/${global_prefix:-16}"
iface="eth0"
echo "Routing \$route to \$gateway via \$iface"
ip route add \$route via \$gateway dev \$iface