|
@@ -96,6 +96,10 @@ if [ -e /etc/default/batctl ]; then
|
96
|
96
|
. /etc/default/batctl
|
97
|
97
|
fi
|
98
|
98
|
|
|
99
|
+function get_ipv6_bat0 {
|
|
100
|
+ echo $(ip -o -f inet6 addr show dev "bat0" | awk '{print $4}' | awk 'END {print}' | awk -F '/' '{print $1}')
|
|
101
|
+}
|
|
102
|
+
|
99
|
103
|
function mesh_hotspot_ip_address {
|
100
|
104
|
echo $(ip -o -f inet addr show dev "$BRIDGE" | awk '{print $4}' | awk 'END {print}' | awk -F '/' '{print $1}')
|
101
|
105
|
}
|
|
@@ -402,6 +406,12 @@ function start {
|
402
|
406
|
|
403
|
407
|
systemctl restart avahi-daemon
|
404
|
408
|
|
|
409
|
+ if [ -f /etc/scuttlebot/.ssb/config ]; then
|
|
410
|
+ ipv6addr=$(get_ipv6_bat0)
|
|
411
|
+ sed -i "s|\"host\": .*|\"host\": \"${ipv6addr}\",|g" /etc/scuttlebot/.ssb/config
|
|
412
|
+ systemctl restart scuttlebot
|
|
413
|
+ fi
|
|
414
|
+
|
405
|
415
|
verify
|
406
|
416
|
}
|
407
|
417
|
|