|
@@ -96,8 +96,8 @@ 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}')
|
|
99
|
+function get_ipv4_wlan {
|
|
100
|
+ echo $(ip -o -f inet addr show dev "$IFACE" | awk '{print $4}' | awk 'END {print}' | awk -F '/' '{print $1}')
|
101
|
101
|
}
|
102
|
102
|
|
103
|
103
|
function mesh_hotspot_ip_address {
|
|
@@ -407,8 +407,7 @@ function start {
|
407
|
407
|
systemctl restart avahi-daemon
|
408
|
408
|
|
409
|
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
|
|
410
|
+ sed -i "s|\"host\": .*|\"host\": \"$(get_ipv4_wlan)\",|g" /etc/scuttlebot/.ssb/config
|
412
|
411
|
systemctl restart scuttlebot
|
413
|
412
|
fi
|
414
|
413
|
|