Update lixonet.sh.tmpl
This commit is contained in:
parent
2c1beade8a
commit
ac1d71f808
@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
gateway=`nslookup tinc | awk -F': ' 'NR==6 { print \$2 } '`
|
gateway=`getent hosts tinc | awk '{ print $1 }'`
|
||||||
route="${network_address}/${global_prefix:-16}"
|
route="${network_address}/${global_prefix:-16}"
|
||||||
iface="eth0"
|
iface="eth0"
|
||||||
|
|
||||||
echo "Routing \$route to \$gateway via \$iface"
|
echo "Routing \$route to \$gateway via \$iface"
|
||||||
ip route add \$route via \$gateway dev \$iface
|
ip route add \$route via \$gateway dev \$iface || echo "Failed to add route; does it already exist?"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user