ansible.fftdf.supernode/files/l2tp_backbone.sh.exit.j2
2019-02-09 12:38:48 +01:00

35 lines
1.2 KiB
Django/Jinja

#!/bin/sh
# Version 9
sleep 60
batctl=/usr/local/sbin/batctl
ip=/sbin/ip
communitymacaddress="{{ communitymac }}"
localserver=$(/bin/hostname)
communityname={{ communityname }}
# Rest Starten
$ip link set address $communitymacaddress:0${localserver#$communityname} dev bat0
$ip link set up dev bat0
$ip addr add {{ sn_mesh_IPv4 }}/19 broadcast {{ sn_mesh_IPv4_brcast }} dev bat0
$ip -6 addr add {{ sn_mesh_IPv6 }}/64 dev bat0
$ip route add 10.188.0.0/16 via {{ sn_mesh_IPv4_xfer }} table 42
$ip route add 10.188.0.0/16 via {{ sn_mesh_IPv4_xfer }}
$ip -6 route add 2a03:2260:121:4000::/52 via {{ sn_mesh_IPv6_xfer }} table 42
$ip -6 route add 2a03:2260:121:5000::/52 via {{ sn_mesh_IPv6_xfer }} table 42
$ip -6 route add 2a03:2260:121:6000::/52 via {{ sn_mesh_IPv6_xfer }} table 42
$ip -6 route add 2a03:2260:121:7000::/52 via {{ sn_mesh_IPv6_xfer }} table 42
/usr/bin/killall batadv-vis
/bin/sleep 15
$batadv -i bat0 -s > /dev/null 2>&1 &
/bin/sleep 15
/usr/sbin/service tunneldigger restart
/usr/sbin/service bind9 restart
/usr/sbin/service bird restart
/usr/sbin/service bird6 restart
/usr/sbin/service isc-dhcp-server restart
/usr/sbin/service radvd restart
$batctl gw server 100Mbit/100Mbit